Methods to add to Database instances that access PostgreSQL via DataObjects.
Add the primary_keys and primary_key_sequences instance variables, so we can get the correct return values for inserted rows.
# File lib/sequel/adapters/do/postgres.rb, line 51 def self.extended(db) db.instance_eval do @primary_keys = {} @primary_key_sequences = {} end end
Return instance of Sequel::DataObjects::Postgres::Dataset with the given opts.
# File lib/sequel/adapters/do/postgres.rb, line 59 def dataset(opts=nil) Sequel::DataObjects::Postgres::Dataset.new(self, opts) end
Run the INSERT sql on the database and return the primary key for the record.
# File lib/sequel/adapters/do/postgres.rb, line 65 def execute_insert(sql, opts={}) synchronize(opts[:server]) do |conn| com = conn.create_command(sql) log_yield(sql){com.execute_non_query} insert_result(conn, opts[:table], opts[:values]) end end
Generated with the Darkfish Rdoc Generator 2.