Module: Sequel::ConnectionPool::ClassMethods
- Included in:
- Sequel::ConnectionPool
- Defined in:
- lib/sequel/connection_pool.rb
Overview
Class methods used to return an appropriate pool subclass, separated into a module for easier overridding by extensions.
Instance Method Summary collapse
-
#get_pool(db, opts = OPTS) ⇒ Object
Return a pool subclass instance based on the given options.
Instance Method Details
#get_pool(db, opts = OPTS) ⇒ Object
Return a pool subclass instance based on the given options. If a :pool_class
option is provided is provided, use that pool class, otherwise use a new instance of an appropriate pool subclass based on the SEQUEL_DEFAULT_CONNECTION_POOL
environment variable if set, or the :single_threaded
and :servers
options, otherwise.
48 49 50 |
# File 'lib/sequel/connection_pool.rb', line 48 def get_pool(db, opts = OPTS) connection_pool_class(opts).new(db, opts) end |