Instance Method
withConnection(_:)
Lease a connection for the provided
closure’s lifetime.func withConnection<Result>(_ closure: nonisolated(nonsending) (PostgresConnection) async throws -> Result) async throws -> Result
Parameters
closureA closure that uses the passed
PostgresConnection. The closure must not capture the providedPostgresConnection.
Return Value
The closure’s return value.