primary_key

primary_key(name, type = :primary_key, options = {}) Instance Public methods Defines the primary key field. Use of the native PostgreSQL UUID type is supported, and can be used by defining your tables as such: create_table :stuffs, id: :uuid do |t| t.string :content t.timestamps end By default, this will use the +uuid_generate_v4()+ function from the uuid-ossp extension, which MUST be enabled on your database. To enable the uuid-ossp extension, you can use the enable_extension

extract_schema_and_table

extract_schema_and_table(name) Instance Public methods Returns an array of [schema_name, table_name] extracted from name. schema_name is nil if not specified in name. schema_name and table_name exclude surrounding quotes (regardless of whether provided in name) name supports the range of schema/table references understood by PostgreSQL, for example: table_name "table.name" schema_name.table_name schema_name."table.name" "schema.name"."table name"

new

new(connection, logger, connection_parameters, config) Class Public methods Initializes and connects a PostgreSQL adapter.

active?

active?() Instance Public methods Is this connection alive and ready for queries?

active_threadsafe?

active_threadsafe?() Instance Public methods

adapter_name

adapter_name() Instance Public methods Returns 'PostgreSQL' as adapter name for identification purposes.

clear_cache!

clear_cache!() Instance Public methods Clears the prepared statements cache.

disable_extension

disable_extension(name) Instance Public methods

disconnect!

disconnect!() Instance Public methods Disconnects from the database if already connected. Otherwise, this method does nothing.

enable_extension

enable_extension(name) Instance Public methods