withConnection<R> abstract method
Future<R>
withConnection<R>(
- Future<
R> fn(- PgConnection connection
- PgSessionSettings? sessionSettings,
Acquires a connection from this pool, opening a new one if necessary, and
calls fn
with it.
The connection must not be used after fn
returns as it could be used by
another withConnection call later.
Implementation
Future<R> withConnection<R>(
Future<R> Function(PgConnection connection) fn, {
PgSessionSettings? sessionSettings,
});