Close the pool and release the associated resources.
Close the pool and release the associated resources.
Set an handler called when the pool has established a connection to the database.
This handler allows interactions with the database before the connection is added to the pool.
When the handler has finished, it must call {@link SqlClient#close} to release the connection to the pool.
Replace the default pool connection provider, the new provider
returns a future connection for a
given .
A {@link ConnectionFactory} can be used as connection provider.
Get a connection from the pool.
Get a connection from the pool.
A connection is borrowed from the connection pool when the query is executed and then immediately returned to the pool after it completes.
Get a connection from the pool and execute the given function
.
When the future returned by the function
completes, the connection is returned to the pool.
The handler
is given a success result when the function returns a succeeded futures.
Otherwise it is given a failure result.
Get a connection from the pool and execute the given function
.
When the future returned by the function
completes, the connection is returned to the pool.
The handler
is given a success result when the function returns a succeeded futures.
Otherwise it is given a failure result.
Execute the given function
within a transaction.
The function
is passed a client executing all operations within a transaction.
When the future returned by the function
The handler
is given a success result when the function returns a succeeded futures and the transaction commits.
Otherwise it is given a failure result.
Execute the given function
within a transaction.
The function
is passed a client executing all operations within a transaction.
When the future returned by the function
The handler
is given a success result when the function returns a succeeded futures and the transaction commits.
Otherwise it is given a failure result.
Like {@link Pool#withTransaction} but allows for setting the mode, defining how the acquired connection is managed during the execution of the function.
Like {@link Pool#withTransaction} but allows for setting the mode, defining how the acquired connection is managed during the execution of the function.
Generated using TypeDoc
A connection pool which reuses a number of SQL connections.