TransactionExecutor class

Query executor for use within transactions.

Implemented types
Mixed-in types

Constructors

TransactionExecutor({required Transaction transaction, required SqlCompiler compiler, required SqlDriverAdapter adapter, SchemaRegistry? schema})

Properties

adapter → SqlDriverAdapter
The database adapter.
no setteroverride
compiler → SqlCompiler
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schema → SchemaRegistry?
Optional schema registry for relation information. When provided, enables includes with automatic JOINs and proper relation deserialization.
final
transaction → Transaction
final

Methods

deserializeValue(dynamic value, ColumnType type) → dynamic
Deserialize a database value to Dart type.
inherited
dispose() → Future<void>
Close the underlying connection. No-op when inside a transaction (a transaction does not own the adapter's connection lifecycle).
override
executeCount(JsonQuery query) → Future<int>
Execute a count query.
override
executeMutation(JsonQuery query) → Future<int>
Execute a mutation within the transaction.
override
executeMutationWithRelationsReturning(JsonQuery query) → Future<Map<String, dynamic>?>
Run a create/update whose data contains nested relation operations (connect/disconnect/create), atomically, and return the RETURNING row. On a root executor this opens a transaction; inside a transaction it reuses the ambient one.
override
executeQuery(JsonQuery query) → Future<SqlResultSet>
Execute a query within the transaction.
executeQueryAsMaps(JsonQuery query) → Future<List<Map<String, dynamic>>>
Execute a query and deserialize results to maps.
override
executeQueryAsSingleMap(JsonQuery query) → Future<Map<String, dynamic>?>
Execute a query expecting a single result.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resultSetToMaps(SqlResultSet result, {bool preserveAliases = false}) → List<Map<String, dynamic>>
Convert SqlResultSet to list of maps.
inherited
runTransaction<T>(Future<T> callback(BaseExecutor), {IsolationLevel? isolationLevel}) → Future<T>
Run callback inside a transaction.
override
snakeToCamelCase(String input) → String
Convert snake_case to camelCase.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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