Class Index [+]

Quicksearch

Sequel::Swift::Postgres::DatabaseMethods

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

Public Class Methods

extended(db) click to toggle source

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/swift/postgres.rb, line 16
16:         def self.extended(db)
17:           db.instance_eval do
18:             @primary_keys = {}
19:             @primary_key_sequences = {}
20:           end
21:         end

Private Instance Methods

server_opts(o) click to toggle source

Remove all other options except for ones specifically handled, as otherwise swift passes them to dbic++ which passes them to PostgreSQL which can raise an error.

    # File lib/sequel/adapters/swift/postgres.rb, line 28
28:         def server_opts(o)
29:           o = super
30:           so = {}
31:           [:db, :user, :password, :host, :port].each{|s| so[s] = o[s] if o.has_key?(s)}
32:           so
33:         end
setup_connection(conn) click to toggle source

Extend the adapter with the Swift PostgreSQL AdapterMethods.

    # File lib/sequel/adapters/swift/postgres.rb, line 36
36:         def setup_connection(conn)
37:           conn = super(conn)
38:           connection_configuration_sqls.each{|sql| log_yield(sql){conn.execute(sql)}}
39:           conn
40:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.