runTx<R> abstract method
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
Future<R> runTx<R>(
Future<R> Function(TxSession session) fn, {
TransactionSettings? settings,
});