resolveTransactionResult method

  1. @override
FutureOr resolveTransactionResult(
  1. dynamic result,
  2. Transaction transaction,
  3. DBSQLMemoryAdapterContext? connection
)
override

Implementation

@override
FutureOr<dynamic> resolveTransactionResult(
    result, Transaction transaction, DBSQLMemoryAdapterContext? connection) {
  var result2 =
      super.resolveTransactionResult(result, transaction, connection);

  if (connection != null && result2 is! TransactionAbortedError) {
    var consolidated = _consolidateTransactionContext(connection);
    if (consolidated != null && consolidated) {
      releaseIntoPool(connection);
    } else {
      disposePoolElement(connection);
    }
  }

  return result2;
}