Class: DBConnectionPool
@divine/uri.DBDriver.DBConnectionPool
Constructors
constructor
• new DBConnectionPool(_dbURI
, params
)
Parameters
Name | Type |
---|---|
_dbURI | DatabaseURI |
params | DBParamsSelector |
Defined in
Properties
_dbURI
• Protected
_dbURI: DatabaseURI
Defined in
_params
• Protected
_params: DBParams
Defined in
defaultBackoff
▪ Static
Readonly
defaultBackoff: (count
: number
) => number
Type declaration
▸ (count
): number
Parameters
Name | Type |
---|---|
count | number |
Returns
number
Defined in
defaultKeepalive
▪ Static
Readonly
defaultKeepalive: 10000
Defined in
defaultMaxConnections
▪ Static
Readonly
defaultMaxConnections: 10
Defined in
defaultRetries
▪ Static
Readonly
defaultRetries: 8
Defined in
defaultTTL
▪ Static
Readonly
defaultTTL: 30000
Defined in
defaultTimeout
▪ Static
Readonly
defaultTimeout: 60000
Defined in
Methods
_createDBConnection
▸ Protected
Abstract
_createDBConnection(): DBConnection
| Promise
<DBConnection
>
Returns
DBConnection
| Promise
<DBConnection
>
Defined in
_getAuthorization
▸ Protected
_getAuthorization(challenges?
): Promise
<undefined
| Authorization
>
Parameters
Name | Type |
---|---|
challenges | WWWAuthenticate [] |
Returns
Promise
<undefined
| Authorization
>
Defined in
uri/src/database-driver.ts:100
_getCredentials
▸ Protected
_getCredentials(): Promise
<undefined
| PasswordCredentials
>
Returns
Promise
<undefined
| PasswordCredentials
>
Defined in
uri/src/database-driver.ts:107
close
▸ close(): Promise
<void
>
Returns
Promise
<void
>
Defined in
session
▸ session<T
>(cb
): Promise
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
cb | (connection : DBConnection ) => Promise <T > |
Returns
Promise
<T
>