CrdbPool class

CockroachDB connection pool for cluster access.

Implemented types

Constructors

CrdbPool({required List<PgEndpoint> endpoints, CrdbPoolSettings? settings, CrdbApiBaseUriFn? baseUriFn})

Properties

events Stream<CrdbPoolEvent>
The events that happen while the pool is working.
no setteroverride
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 CrdbPoolSettings
getter/setter pairoverride

Methods

cancelTransaction({String? reason}) → void
Cancels a transaction on this context.
override
close() Future
override
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.
override
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.
override
status() CrdbPoolStatus
Get the current debug information of the pool's internal state.
override
toString() String
A string representation of this object.
inherited

Operators

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