class ActiveRecord::ConnectionAdapters::PoolConfig
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_record/connection_adapters/pool_config.rbs class ActiveRecord::ConnectionAdapters::PoolConfig def pool: () -> ActiveRecord::ConnectionAdapters::ConnectionPool end
:nodoc:
def connection_name
def connection_name if connection_class.primary_class? "ActiveRecord::Base" else connection_class.name end end
def discard_pool!
def discard_pool! return unless @pool synchronize do return unless @pool @pool.discard! @pool = nil end end
def discard_pools!
def discard_pools! INSTANCES.each_key(&:discard_pool!) end
def disconnect!(automatic_reconnect: false)
def disconnect!(automatic_reconnect: false) ActiveSupport::ForkTracker.check! return unless @pool synchronize do return unless @pool @pool.automatic_reconnect = automatic_reconnect @pool.disconnect! end nil end
def disconnect_all!
def disconnect_all! INSTANCES.each_key { |c| c.disconnect!(automatic_reconnect: true) } end
def initialize(connection_class, db_config, role, shard)
def initialize(connection_class, db_config, role, shard) super() @connection_class = connection_class @db_config = db_config @role = role @shard = shard @pool = nil INSTANCES[self] = self end
def pool
Experimental RBS support (using type sampling data from the type_fusion
project).
def pool: () -> ActiveRecord::ConnectionAdapters::ConnectionPool
This signature was generated using 1 sample from 1 application.
def pool ActiveSupport::ForkTracker.check! @pool || synchronize { @pool ||= ConnectionAdapters::ConnectionPool.new(self) } end
def schema_reflection
def schema_reflection @schema_reflection ||= SchemaReflection.new(db_config.lazy_schema_cache_path) end