openTransaction method

  1. @override
DBObjectDirectoryAdapterContext openTransaction(
  1. Transaction transaction
)
override

Implementation

@override
DBObjectDirectoryAdapterContext openTransaction(Transaction transaction) {
  var conn = createConnection();

  _openTransactionsContexts[conn] = DateTime.now();

  transaction.transactionFuture
      // ignore: discarded_futures
      .then(
    // ignore: discarded_futures
    (res) => resolveTransactionResult(res, transaction, conn),
    onError: (e, s) {
      cancelTransaction(transaction, conn, e, s);
      throw e;
    },
  );

  return conn;
}