class AbstractAdapter
Ruby on Rails 5.2.8.1
Active Record supports multiple database systems. AbstractAdapter and related classes form the abstraction layer which makes this possible. An AbstractAdapter represents a connection to a database, and provides an abstract interface for database-specific functionality such as establishing a connection, escaping values, building the right SQL fragments for :offset and :limit options, etc.
All the concrete database adapters follow the interface laid down in this class. ActiveRecord::Base.connection returns an AbstractAdapter object, which you can use.
Most of the methods in the adapter are useful during migrations. Most notably, the instance methods provided by SchemaStatements are very useful.
Inherits from
Namespace
Classes
Includes
Constants
Attributes
- ActiveRecord::ConnectionAdapters::AbstractAdapter#in_use?
- ActiveRecord::ConnectionAdapters::AbstractAdapter#lock
- ActiveRecord::ConnectionAdapters::AbstractAdapter#logger
- ActiveRecord::ConnectionAdapters::AbstractAdapter#owner
- ActiveRecord::ConnectionAdapters::AbstractAdapter#pool
- ActiveRecord::ConnectionAdapters::AbstractAdapter#prepared_statements
- ActiveRecord::ConnectionAdapters::AbstractAdapter#schema_cache
- ActiveRecord::ConnectionAdapters::AbstractAdapter#visitor
Methods (defined here)
- # active?
- # adapter_name
- # clear_cache!
- # close
- # disable_extension
- # disable_referential_integrity
- # discard!
- # disconnect!
- # enable_extension
- # expire
- # extensions
- # index_algorithms
- # lease
- # prefetch_primary_key?
- # raw_connection
- # reconnect!
- # requires_reloading?
- # reset!
- # schema_cache=
- # supports_advisory_locks?
- # supports_bulk_alter?
- # supports_comments?
- # supports_comments_in_create?
- # supports_datetime_with_precision?
- # supports_ddl_transactions?
- # supports_explain?
- # supports_expression_index?
- # supports_extensions?
- # supports_foreign_keys?
- # supports_foreign_keys_in_create?
- # supports_foreign_tables?
- # supports_indexes_in_create?
- # supports_index_sort_order?
- # supports_json?
- # supports_multi_insert?
- # supports_partial_index?
- # supports_savepoints?
- # supports_transaction_isolation?
- # supports_validate_constraints?
- # supports_views?
- # supports_virtual_columns?
- # unprepared_statement
- # verify!
- self. type_cast_config_to_boolean
- self. type_cast_config_to_integer
Private methods (16)
Show private methods Implementation detail — not part of the public API.
- # arel_visitor
- # can_perform_case_insensitive_comparison_for?
- # collector
- # column_for
- # extract_limit
- # extract_precision
- # extract_scale
- # initialize_type_map
- # log
- # register_class_with_limit
- # register_class_with_precision
- # reload_type_map
- # translate_exception
- # translate_exception_class
- # type_map
- # without_prepared_statement?
Used by
Subclasses (3)
Methods (inherited)
From ActiveRecord::ConnectionAdapters::DatabaseLimits
(11)
From ActiveRecord::ConnectionAdapters::QueryCache
(8)
- # cache
- # clear_query_cache
- # disable_query_cache!
- # enable_query_cache!
- # select_all
- # uncached
- self. dirties_query_cache
- self. new
From ActiveRecord::ConnectionAdapters::Savepoints
(4)
From ActiveSupport::Callbacks
(1)
From Object
(17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options
From ActiveSupport::Concern
(3)
From ActiveSupport::DescendantsTracker
(7)
- # descendants
- # direct_descendants
- # inherited
- self. clear
- self. descendants
- self. direct_descendants
- self. store_inherited