PostgresDriver class final

Owns or borrows a PostgreSQL pool and leases one connection per callback.

Owned pools configure exact temporal codecs and cancellation connections. A borrowed pool enables these capabilities only when explicitly configured.

Implemented types

Constructors

PostgresDriver(PostgresOptions options)
Creates an owned pool; physical connections open as leases are acquired.
PostgresDriver.borrow(Pool<void> pool, {Future<Connection> cancellationConnection()?, Duration? queryTimeout, bool temporal = false})
Uses a caller-owned pool, which remains open when this driver closes.

Properties

capabilities → Capabilities
Features and limits exposed by this adapter and its actual backend.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Rejects new leases and closes the pool only when this driver owns it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<R>(Future<R> action(SqlConnection)) → Future<R>
Leases a pooled connection for the lifetime of the callback future.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited