runTx<R> abstract method

  1. @override
Future<R> runTx<R>(
  1. Future<R> fn(
    1. TxSession session
    ), {
  2. TransactionSettings? settings,
  3. L? locality,
})
override

Obtains a Session running in a transaction and calls fn with it.

Returns the result of invoking fn (either the value or an error). In case of fn throwing, the transaction will be reverted.

Note that other invocations on a Connection are blocked while a transaction is active.

Implementation

@override
Future<R> runTx<R>(
  Future<R> Function(TxSession session) fn, {
  TransactionSettings? settings,
  L? locality,
});