executeOperation<T, R> method

  1. @protected
FutureOr<R> executeOperation<T, R>(
  1. TransactionOperation op,
  2. FutureOr<T> f(
    1. DBObjectGCSAdapterContext connection
    ),
  3. PreFinishDBOperation<T, R>? preFinish
)
inherited

Executes f in the transaction of op, and finishes op (with preFinish) after that execution, not inside it: a preFinish can issue other operations in the same transaction (e.g. selecting the sub-entities), executed after this one (inside it, they would wait for it, that waits for them).

Implementation

@protected
FutureOr<R> executeOperation<T, R>(
  TransactionOperation op,
  FutureOr<T> Function(C connection) f,
  PreFinishDBOperation<T, R>? preFinish,
) => executeTransactionOperation<T>(
  op,
  f,
).resolveMapped((res) => _finishOperation<T, R>(op, res, preFinish));