transaction<T> static method
Runs body as a reversible unit of work.
Use context.afterCommit(...) for irreversible effects that must not
happen unless the transaction commits, and context.compensate(...) to
register the inverse of an external effect Dartvel cannot reverse itself.
Nested calls join the active transaction unless isolated is set.
Implementation
static Future<T> transaction<T>(
FutureOr<T> Function(DVContext context) body, {
bool isolated = false,
}) =>
_transactionRunner.call<T>(body, isolated: isolated);