Members
(static) dependencies :Array.<string>
Class dependencies:
['config', 'db.connection']
.
Methods
getConnection(nameopt)
Get connection by name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string |
<optional> |
"default"
|
The connection name. |
Returns:
A Knex connection instance.
- Type
- Knex
getDefaultConnection()
Get default connection.
Returns:
A Knex connection instance.
- Type
- Knex
getDriverForConnection(name)
Retrieve driver for connection by name.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
string | Knex |
default
|
Either a connection name or a Knex connection instance. |
Returns:
The underlying driver instance.
getForward()
Get default connection for forward calls.
Returns:
The connection instance.
- Type
- Knex