Class Index [+]

Quicksearch

Sequel::JDBC::Postgres::DatabaseMethods

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

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

Private Instance Methods

set_ps_arg(cps, arg, i) click to toggle source

Use setNull for nil arguments as the default behavior of setString with nil doesn’t appear to work correctly on PostgreSQL.

    # File lib/sequel/adapters/jdbc/postgresql.rb, line 28
28:         def set_ps_arg(cps, arg, i)
29:           arg.nil? ? cps.setNull(i, JavaSQL::Types::NULL) : super
30:         end
setup_connection(conn) click to toggle source

Execute the connection configuration SQL queries on the connection.

    # File lib/sequel/adapters/jdbc/postgresql.rb, line 33
33:         def setup_connection(conn)
34:           conn = super(conn)
35:           statement(conn) do |stmt|
36:             connection_configuration_sqls.each{|sql| log_yield(sql){stmt.execute(sql)}}
37:           end
38:           conn
39:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.