dvCommitContext function

Future<void> dvCommitContext(
  1. DVContext context
)

Runs the after-commit work context collected, in the order it was added.

For a context handed to a backend function, which is made per request and is not a DVTransactionRunner transaction: the generated handler calls this once the function has returned, so afterCommit there means what it means inside DV.transaction.

Implementation

Future<void> dvCommitContext(DVContext context) async {
  for (final FutureOr<void> Function() callback in context.pendingAfterCommit) {
    await callback();
  }
}