class ActiveRecord::Base

Public Class Methods

current_scoped_schema() click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 808
def current_scoped_schema
  self.connection.current_scoped_schema
end
disable_triggers(*triggers) click to toggle source

Disable triggers. If no triggers are specified, all triggers will be disabled. You can specify ALL or USER triggers by using the symbols :all or :user. If you have actual triggers named “all” or “user”, use Strings instead of Symbols.

# File lib/active_record/postgresql_extensions/triggers.rb, line 31
def disable_triggers(*triggers)
  self.connection.disable_triggers(self.table_name, *triggers)
end
enable_triggers(*triggers) click to toggle source

Enable triggers. If no triggers are specified, all triggers will be enabled. You can specify ALL or USER triggers by using the symbols :all or :user. If you have actual triggers named “all” or “user”, use Strings instead of Symbols.

# File lib/active_record/postgresql_extensions/triggers.rb, line 23
def enable_triggers(*triggers)
  self.connection.enable_triggers(self.table_name, *triggers)
end
ignore_scoped_schema() { |*block_args| ... } click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 798
def ignore_scoped_schema
  self.connection.ignore_scoped_schema { |*block_args|
    yield(*block_args)
  }
end
scoped_schemas() click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 804
def scoped_schemas
  self.connection.scope_schemas
end
sequence_exists?() click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 812
def sequence_exists?
  !!(connection.sequence_exists?(sequence_name) if connection.respond_to?(:sequence_exists?))
end
view_exists?() click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 816
def view_exists?
  connection.view_exists?(table_name)
end
with_schema(schema) { |*block_args| ... } click to toggle source
# File lib/active_record/postgresql_extensions/adapter_extensions.rb, line 792
def with_schema(schema)
  self.connection.with_schema(schema) { |*block_args|
    yield(*block_args)
  }
end
without_triggers(*triggers) { || ... } click to toggle source

Temporarily disable triggers. If no triggers are specified, all triggers will be disabled. You can specify ALL or USER triggers by using the symbols :all or :user. If you have actual triggers named “all” or “user”, use Strings instead of Symbols.

# File lib/active_record/postgresql_extensions/triggers.rb, line 40
def without_triggers(*triggers)
  self.connection.without_triggers(self.table_name, *triggers) do
    yield
  end
end