module Sequel::Postgres

Top level module for holding all PostgreSQL-related modules and classes for Sequel. All adapters that connect to PostgreSQL support the following options:

:client_min_messages

Change the minimum level of messages that PostgreSQL will send to the the client. The PostgreSQL default is NOTICE, the Sequel default is WARNING. Set to nil to not change the server default. Overridable on a per instance basis via the :client_min_messages option.

:force_standard_strings

Set to false to not force the use of standard strings. Overridable on a per instance basis via the :force_standard_strings option.

:search_path

Set the schema search_path for this Database's connections. Allows to to set which schemas do not need explicit qualification, and in which order to check the schemas when an unqualified object is referenced.

Constants

CONVERSION_PROCS
JSONB_COMBINED_WRAPPER_MAPPING
JSONB_PRIMITIVE_WRAPPER_MAPPING
JSONB_WRAPPER_MAPPING
JSONB_WRAP_CLASSES
JSON_COMBINED_WRAPPER_MAPPING
JSON_PRIMITIVE_WRAPPER_MAPPING
JSON_WRAPPER_MAPPING
JSON_WRAP_CLASSES
MINUS_INFINITY
NAN
PGError
PG_QUERY_TYPE_MAP
PGconn
PGresult
PLUS_INFINITY
TYPE_TRANSLATOR_DATE
USES_PG

Public Class Methods

mock_adapter_setup(db) click to toggle source
   # File lib/sequel/adapters/shared/postgres.rb
88 def self.mock_adapter_setup(db)
89   db.instance_exec do
90     @server_version = 90500
91     initialize_postgres_adapter
92     extend(MockAdapterDatabaseMethods)
93   end
94 end
sequel_pg_version_supported?(version) click to toggle source

Whether the given sequel_pg version integer is supported.

   # File lib/sequel/adapters/postgres.rb
37 def self.sequel_pg_version_supported?(version)
38   version >= 10617
39 end

Public Instance Methods

sql_literal_append(ds, sql) click to toggle source
    # File lib/sequel/extensions/pg_json.rb
141 def sql_literal_append(ds, sql)
142   ds.literal_append(sql, Sequel.object_to_json(self))
143   sql << '::json'
144 end