method

resolve_pool_config

Importance_1
v7.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
resolve_pool_config(config, owner_name, role, shard) private

Returns an instance of PoolConfig for a given adapter. Accepts a hash one layer deep that contains all connection information.

Example

config = { "production" => { "host" => "localhost", "database" => "foo", "adapter" => "sqlite3" } }
pool_config = Base.configurations.resolve_pool_config(:production)
pool_config.db_config.configuration_hash
# => { host: "localhost", database: "foo", adapter: "sqlite3" }
Show source
Register or log in to add new notes.