runTransaction abstract method

FutureOr<void> runTransaction(
  1. FutureOr<void> transaction(
    1. ModelTransactionRef ref
    )
)

Do the processing to execute the transaction.

Create an adapter-specific ModelTransactionRef that internally inherits from ModelTransactionRef, create a ModelTransactionDocument from that ModelTransactionRef.read, pass it directly to the TransactionRef], create a ModelTransactionDocument from that ModelTransactionRef.read, pass it directly to the transaction argument, and then execute the transaction.

トランザクションを実行するための処理を行います。

内部でModelTransactionRefを継承したアダプター専用のModelTransactionRefを作成し、そのModelTransactionRef.readからModelTransactionDocumentを作成、それをそのままtransactionの引数に渡し、transactionを実行するようにしてください。

Implementation

FutureOr<void> runTransaction(
  FutureOr<void> Function(
    ModelTransactionRef ref,
  ) transaction,
);