class PGTrunk::Adapters::Postgres::Connection

Decorates an ActiveRecord connection with methods that help determine the connections capabilities.

Every attempt is made to use the versions of these methods defined by Rails where they are available and public before falling back to our own implementations for older Rails versions.

@private

Public Instance Methods

check_constraint_name(table, expression) click to toggle source

Expose private method helpers

# File lib/pg_trunk/core/adapters/postgres.rb, line 33
def check_constraint_name(table, expression)
  __getobj__.send(
    :check_constraint_name,
    table,
    expression: expression,
  )
end
server_version() click to toggle source
# File lib/pg_trunk/core/adapters/postgres.rb, line 27
def server_version
  raw_connection.server_version.to_s
end
strip_table_name(table) click to toggle source
# File lib/pg_trunk/core/adapters/postgres.rb, line 41
def strip_table_name(table)
  __getobj__.send(:strip_table_name_prefix_and_suffix, table)
end