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 initialize: (Class connection_class, ActiveRecord::DatabaseConfigurations::HashConfig db_config, Symbol role, Symbol shard) -> void def pool: () -> ActiveRecord::ConnectionAdapters::ConnectionPool end
:nodoc:
def connection_specification_name
def connection_specification_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!
def disconnect! ActiveSupport::ForkTracker.check! return unless @pool synchronize do return unless @pool @pool.automatic_reconnect = false @pool.disconnect! end nil end
def initialize(connection_class, db_config, role, shard)
Experimental RBS support (using type sampling data from the type_fusion project).
def initialize: (Class connection_class, ActiveRecord::DatabaseConfigurations::HashConfig db_config, Symbol role, Symbol shard) -> void
This signature was generated using 1 sample from 1 application.
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 129 samples from 3 applications.
def pool ActiveSupport::ForkTracker.check! @pool || synchronize { @pool ||= ConnectionAdapters::ConnectionPool.new(self) } end