Transaction<R> class

Constructors

Transaction(Db db, {required bool useTransaction})
Create a database transaction for db.

Properties

db Db
final
hashCode int
The hash code for this object.
no setterinherited
id int
unique id used for debugging
getter/setter pair
logger → Logger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useTransaction bool
For debugging purposes the user can suppress the use of a transaction so that they can see db updates as they happen.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rollback() Future<void>
run(Future<R> action(), {required String? debugName}) Future<R>
useTransaction is intended for debugging purposes. By setting useTransaction and db changes are visible as soon as the occur rather than only once the transaction completes. So this option allows you to inspect the db as updates occur.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

current Transaction
no setter
transactionKey → ScopeKey<Transaction>
final