module PgConn
def self.===(element) element.is_a?(PgConn::Connection) or super end
def self.===(element) element.is_a?(PgConn::Connection) or super end
def self.ensure(*args)
PgConn::Connection#initialize arguments that will be used to create a new
can be an existing connection that will just be returned or a set of
Returns a PgConn::Connection object (aka. a PgConn object). It's arguments
def self.ensure(*args) if args.size == 1 && args.first.is_a?(PgConn::Connection) args.first else PgConn::Connection.new(*args) end end
def self.new(*args, &block) Connection.new(*args, &block) end
def self.new(*args, &block) Connection.new(*args, &block) end
def self.sql_idents(values) '"' + values.join('", "') + '"' end
def self.sql_idents(values) '"' + values.join('", "') + '"' end
def self.sql_values(values) "'" + values.join("', '") + "'" end
def self.sql_values(values) "'" + values.join("', '") + "'" end