Module | Sequel::DataObjects::Postgres::DatabaseMethods
In: | lib/sequel/adapters/do/postgres.rb

Methods to add to Database instances that access PostgreSQL via DataObjects.

### Methods

dataset execute_insert extended

### Included Modules

Sequel::Postgres::DatabaseMethods

### Public Class methods

extended(db)

Add the primary_keys and primary_key_sequences instance variables, so we can get the correct return values for inserted rows.

[Source]

        # File lib/sequel/adapters/do/postgres.rb, line 52
    52:         def self.extended(db)
    53:           db.instance_eval do
    54:             @primary_keys = {}
    55:             @primary_key_sequences = {}
    56:           end
    57:         end

### Public Instance methods

dataset(opts=nil)

Return instance of Sequel::DataObjects::Postgres::Dataset with the given opts.

[Source]

        # File lib/sequel/adapters/do/postgres.rb, line 60
    60:         def dataset(opts=nil)
    61:           Sequel::DataObjects::Postgres::Dataset.new(self, opts)
    62:         end

execute_insert(sql, opts={})

Run the INSERT sql on the database and return the primary key for the record.

[Source]

        # File lib/sequel/adapters/do/postgres.rb, line 66
    66:         def execute_insert(sql, opts={})
    67:           log_info(sql)
    68:           synchronize(opts[:server]) do |conn|
    69:             conn.create_command(sql).execute_non_query
    70:             insert_result(conn, opts[:table], opts[:values])
    71:           end
    72:         end

[Validate]