runTransaction<T> method
Run callback inside a transaction.
On a root executor this opens a new transaction. On an executor that is
already inside a transaction, it reuses the ambient transaction so a
nested $transaction flattens instead of failing (PostgreSQL has no true
nested transactions). isolationLevel is honoured only when a new
transaction is opened.
Implementation
@override
Future<T> runTransaction<T>(
Future<T> Function(BaseExecutor) callback, {
IsolationLevel? isolationLevel,
}) =>
executeInTransaction<T>(callback, isolationLevel: isolationLevel);