Returns a future of a Connection.
Shuts down this connection factory.
Shuts down this connection factory.
Returned future never fails - it completes on finished shutdown attempt. After the factory is shut down it is illegal to request new connections from it.
Executes a function in a context of a connection.
Executes a function in a context of a connection.
Executes a function (which can be passed as a code block) in a context of a connection obtained via connection method, and releases the connection afterwards.
Executes a function in a context of a transaction.
Executes a function in a context of a transaction.
Executes a function (which can be passed as a code block) in a context of a connection obtained via connection method. Before the function is executed, transaction is started. After the function finishes, transaction is committed in case of a success and rolled back in case of a failure - after that, the connection is released.
Because managing transaction state requires invoking functions that require specifying a timeout, this function requires an implicit timeout instance.
Provides access to a database Connection.
Implementors are encouraged to make the implementation of this trait thread-safe.