method
new
new(connection, logger = nil, config = {})
public
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 118 def initialize(connection, logger = nil, config = {}) # :nodoc: super() @connection = connection @owner = nil @instrumenter = ActiveSupport::Notifications.instrumenter @logger = logger @config = config @pool = ActiveRecord::ConnectionAdapters::NullPool.new @idle_since = Concurrent.monotonic_time @visitor = arel_visitor @statements = build_statement_pool @lock = ActiveSupport::Concurrency::LoadInterlockAwareMonitor.new if self.class.type_cast_config_to_boolean(config.fetch(:prepared_statements) { true }) @prepared_statement_status = Concurrent::ThreadLocalVar.new(true) @visitor.extend(DetermineIfPreparableVisitor) else @prepared_statement_status = Concurrent::ThreadLocalVar.new(false) end @advisory_locks_enabled = self.class.type_cast_config_to_boolean( config.fetch(:advisory_locks, true) ) end