cancelTransaction method

  1. @override
bool cancelTransaction(
  1. Transaction transaction,
  2. DBObjectMemoryAdapterContext? connection,
  3. Object? error,
  4. StackTrace? stackTrace,
)
override

Implementation

@override
bool cancelTransaction(
    Transaction transaction,
    DBObjectMemoryAdapterContext? connection,
    Object? error,
    StackTrace? stackTrace) {
  if (connection == null) return true;
  _openTransactionsContexts.remove(connection);
  _rollbackTables(connection.tablesVersions);
  return true;
}