-
Notifications
You must be signed in to change notification settings - Fork 16
API StaticPool
The StaticPool is a Pool implementation where the pools for a given connection URL are static. That is two constructors with the same URL will still use the same pool of connections.
var pool = new StaticPool( connection: string | ConnectionObject, poolSize: integer, driver?: DatabaseDriver )
Type: string or ConnectionObject
Defines the connection parameters for all connections in the pool.
Type: integer
Defines the number of connections in the pool.
Type: DatabaseDriver
An optional parameter. Used to pass in a specific driver class. If this is specified, the driver name is ignored in the connection argument.
Type: integer
Returns the number of available connections in the pool.
Type: integer
Returns the number of connection in use from the pool.
Type: integer
Returns the total number of connections n the pool
Retrieves an available connection from the pool, or adds one if required.
Returns: PooledConnection
Closes the pool and forces all connections in the pool to close;
Returns: Promise
Returns a boolean promise that resolves when all the connections in the pool have been closed.