Object
# File lib/postgres-pr/postgres-compat.rb, line 42 def self.escape(str) str.gsub("'","''").gsub("\\", "\\\\\\\\") end
# File lib/postgres-pr/postgres-compat.rb, line 11 def initialize(host, port, options, tty, database, user, auth) uri = if host.nil? nil elsif host[0] != // "tcp://#{ host }:#{ port }" else "unix:#{ host }/.s.PGSQL.#{ port }" end @host = host @db = database @user = user @conn = PostgresPR::Connection.new(database, user, auth, uri) end
# File lib/postgres-pr/postgres-compat.rb, line 26 def close @conn.close end
# File lib/postgres-pr/postgres-compat.rb, line 46 def notice_processor @conn.notice_processor end
# File lib/postgres-pr/postgres-compat.rb, line 50 def notice_processor=(np) @conn.notice_processor = np end
# File lib/postgres-pr/postgres-compat.rb, line 32 def query(sql) PGresult.new(@conn.query(sql)) end
Generated with the Darkfish Rdoc Generator 2.