class PGconn
Attempt to get uniform behavior for the PGconn object no matter if pg, postgres, or postgres-pr is used.
Public Class Methods
unescape_bytea(obj)
click to toggle source
If no valid bytea unescaping method can be found, create one that raises an error
# File lib/sequel/adapters/postgres.rb, line 63 def self.unescape_bytea(obj) raise Sequel::Error, "bytea unescaping not supported with this postgres driver. Try using ruby-pg, ruby-postgres, or postgres-pr." end
Public Instance Methods
block(timeout=nil)
click to toggle source
# File lib/sequel/adapters/postgres.rb, line 72 def block(timeout=nil) end
escape_bytea(obj)
click to toggle source
If there is no #escape_bytea instance method, but there is an #escape_bytea class method, use that instead.
# File lib/sequel/adapters/postgres.rb, line 41 def escape_bytea(obj) self.class.escape_bytea(obj) end
escape_string(str)
click to toggle source
If there is no #escape_string instance method, but there is an escape class method, use that instead.
# File lib/sequel/adapters/postgres.rb, line 23 def escape_string(str) Sequel::Postgres.force_standard_strings ? str.gsub("'", "''") : self.class.escape(str) end
status()
click to toggle source
# File lib/sequel/adapters/postgres.rb, line 79 def status CONNECTION_OK end