class AbstractAdapter
Ruby on Rails 7.2.3
Active Record Abstract Adapter
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.lease_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
- ActiveRecord::ConnectionAdapters::AbstractAdapter::ADAPTER_NAME
- ActiveRecord::ConnectionAdapters::AbstractAdapter::COMMENT_REGEX
- ActiveRecord::ConnectionAdapters::AbstractAdapter::DEFAULT_READ_QUERY
- ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_IMMEDIATE
- ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_NEVER
- ActiveRecord::ConnectionAdapters::AbstractAdapter::EXTENDED_TYPE_MAPS
- ActiveRecord::ConnectionAdapters::AbstractAdapter::SIMPLE_INT
- ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP
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#visitor
Methods (defined here)
- # active?
- # adapter_name
- # check_all_foreign_keys_valid!
- # clear_cache!
- # close
- # connect!
- # connected?
- # connection_retries
- # database_exists?
- # default_timezone
- # disable_extension
- # disable_referential_integrity
- # discard!
- # disconnect!
- # enable_extension
- # expire
- # extensions
- # index_algorithms
- # lease
- # pool=
- # prefetch_primary_key?
- # prepared_statements
- # prepared_statements?
- # preventing_writes?
- # raw_connection
- # reconnect!
- # replica?
- # requires_reloading?
- # reset!
- # retry_deadline
- # role
- # savepoint_errors_invalidate_transactions?
- # schema_cache
- # schema_version
- # shard
- # supports_advisory_locks?
- # supports_bulk_alter?
- # supports_check_constraints?
- # supports_comments?
- # supports_comments_in_create?
- # supports_common_table_expressions?
- # supports_concurrent_connections?
- # supports_datetime_with_precision?
- # supports_ddl_transactions?
- # supports_deferrable_constraints?
- # supports_exclusion_constraints?
- # supports_explain?
- # supports_expression_index?
- # supports_extensions?
- # supports_foreign_keys?
- # supports_foreign_tables?
- # supports_indexes_in_create?
- # supports_index_include?
- # supports_index_sort_order?
- # supports_insert_conflict_target?
- # supports_insert_on_duplicate_skip?
- # supports_insert_on_duplicate_update?
- # supports_insert_returning?
- # supports_json?
- # supports_lazy_transactions?
- # supports_materialized_views?
- # supports_nulls_not_distinct?
- # supports_optimizer_hints?
- # supports_partial_index?
- # supports_partitioned_indexes?
- # supports_restart_db_transaction?
- # supports_savepoints?
- # supports_transaction_isolation?
- # supports_unique_constraints?
- # supports_validate_constraints?
- # supports_views?
- # supports_virtual_columns?
- # throw_away!
- # unprepared_statement
- # verify!
- # verify_timeout
- self. database_exists?
- self. dbconsole
- self. find_cmd_and_exec
- self. type_cast_config_to_boolean
- self. type_cast_config_to_integer
- self. validate_default_timezone
Private methods (33)
Show private methods Implementation detail — not part of the public API.
- # any_raw_connection
- # arel_visitor
- # attempt_configure_connection
- # backoff
- # build_result
- # build_statement_pool
- # can_perform_case_insensitive_comparison_for?
- # collector
- # column_for
- # column_for_attribute
- # configure_connection
- # default_prepared_statements
- # extended_type_map_key
- # invalidate_transaction
- # log
- # reconnect
- # reconnect_can_restore_state?
- # retryable_connection_error?
- # retryable_query_error?
- # transform_query
- # translate_exception
- # translate_exception_class
- # type_map
- # valid_raw_connection
- # verified!
- # warning_ignored?
- # without_prepared_statement?
- # with_raw_connection
- self. extract_limit
- self. extract_precision
- self. extract_scale
- self. initialize_type_map
- self. register_class_with_limit
Used by
Subclasses (3)
Methods (inherited)
From ActiveRecord::ConnectionAdapters::DatabaseLimits
(3)
From ActiveRecord::ConnectionAdapters::QueryCache
(9)
- # cache
- # clear_query_cache
- # disable_query_cache!
- # enable_query_cache!
- # query_cache
- # query_cache_enabled
- # 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!
- # with
- # with_options
From ActiveSupport::Concern
(3)
- # class_methods
- # included
- # prepended
From ActiveSupport::DescendantsTracker
(3)
- # descendants
- self. descendants
- self. subclasses
From ActiveSupport::NumericWithFormat
(2)
- # to_formatted_s
- # to_fs