Module connection/pool
Basic JDBC connection pool implementation.
ConnectionPool (props)
Creates a new connection pool instance
Parameters
Object | props | The connection properties to use |
Returns
A newly created connection pool |
ConnectionPool.prototype.close ()
Loops over all connections and closes them. This method also stops the worker cleaning up stale connections.
Returns
undefined |
ConnectionPool.prototype.getConnection ()
Searches for an unused connection and returns it. This method throws an error if the connection limit has been reached (if any has been defined during construction of this pool).
Returns
Connection | A Connection instance |
ConnectionPool.prototype.getDriverClass ()
Returns the class name of the JDBC driver used by this connection pool
Returns
String | The driver class name |
ConnectionPool.prototype.size ()
Returns the number of connections in this pool
Returns
Number | The number of connections in this pool |