DatabaseClient class final

A logical client. Concurrent operations are serialized by the owner. An explicit transaction belongs to the client that began it; other clients receive StateError until commit/rollback. Lost clients can be recovered by closing the owner, which rolls back uncommitted state.

Available extensions

Constructors

DatabaseClient.connect(SendPort _owner)

Properties

hashCode → int
The hash code for this object.
no setterinherited
inTransaction → bool
Whether this client owns an open transaction.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkpoint() → Future<void>
close() → void
execute(String sql, [List<Object?> parameters = const []]) → Future<MutationResult>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
page({required String table, required List<String> keyColumns, List<PageOrder> orderBy = const [], List<String>? columns, String? where, List<Object?> parameters = const [], int size = 30, PageCursor? after, PageCursor? before, String cursorScope = ''}) → Future<SqlPage<Map<String, Object?>>>

Available on DatabaseClient, provided by the DatabaseClientPagination extension

query(String sql, [List<Object?> parameters = const []]) → Future<QueryResult>
toString() → String
A string representation of this object.
inherited

Operators

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