PgPool class
Single-server connection pool for PostgresSQL database access.
- Implemented types
Constructors
- PgPool(PgEndpoint url, {PgPoolSettings? settings})
Properties
-
events
→ Stream<
PgPoolEvent> -
The events that happen while the pool is working.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- queueSize → int
-
Returns this context queue size
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ PgPoolSettings
-
getter/setter pair
Methods
-
cancelTransaction(
{String? reason}) → void -
Cancels a transaction on this context.
override
-
close(
) → Future -
execute(
String fmtString, {Map< String, dynamic> ? substitutionValues, int? timeoutInSeconds, String? sessionId, String? traceId}) → Future<int> -
Executes a query on this context.
override
-
mappedResultsQuery(
String fmtString, {Map< String, dynamic> ? substitutionValues, bool? allowReuse = true, int? timeoutInSeconds, String? sessionId, String? traceId}) → Future<List< Map< >String, Map< >String, dynamic> > -
Executes a query on this connection and returns each row as a Map.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String fmtString, {Map< String, dynamic> ? substitutionValues, bool? allowReuse = true, int? timeoutInSeconds, String? sessionId, String? traceId}) → Future<PostgreSQLResult> -
Executes a query on this context.
override
-
run<
R> (PgSessionFn< R> fn, {RetryOptions? retryOptions, FutureOr<R> orElse()?, FutureOr<bool> retryIf(Exception)?, String? sessionId, String? traceId}) → Future<R> -
Runs
fn
outside of a transaction. -
runTx<
R> (PgSessionFn< R> fn, {RetryOptions? retryOptions, FutureOr<R> orElse()?, FutureOr<bool> retryIf(Exception)?, String? sessionId, String? traceId}) → Future<R> -
Runs
fn
in a transaction. -
status(
) → PgPoolStatus - Get the current debug information of the pool's internal state.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited