lib/baza/driver/pg/table.rb in baza-0.0.36 vs lib/baza/driver/pg/table.rb in baza-0.0.37

- old
+ new

@@ -1,11 +1,11 @@ class Baza::Driver::Pg::Table < Baza::Table attr_reader :name - def initialize(args) - @db = args.fetch(:driver).db - @data = args.fetch(:data) + def initialize(driver:, data:) + @db = driver.db + @data = data @name = @data.fetch(:table_name) end def drop @db.with_database(database_name) do @@ -34,10 +34,10 @@ def database_name @data.fetch(:table_catalog) end def native? - false + name == "pg_stat_statements" end def columns(args = {}) where_args = { table_catalog: @db.opts[:db],