method

resolve_connection

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

resolve_connection(config_or_env, pool_name = nil)
private

Returns fully resolved connection, accepts hash, string or symbol. Always returns a hash.

Examples

Symbol representing current environment.

Resolver.new("production" => {}).resolve_connection(:production)
# => {}

One layer deep hash of connection values.

Resolver.new({}).resolve_connection("adapter" => "sqlite3")
# => { "adapter" => "sqlite3" }

Connection URL.

Resolver.new({}).resolve_connection("postgresql://localhost/foo")
# => { "host" => "localhost", "database" => "foo", "adapter" => "postgresql" }