rollback method

bool rollback()

Rolls back the transaction.

Returns true on success, false on failure. After this call the transaction is no longer active and the finalizer will not fire.

Implementation

bool rollback() {
  if (_state != _State.active) {
    return false;
  }
  final ok = _backend.rollbackTransaction(_txnId);
  _state = ok ? _State.rolledBack : _State.failed;
  if (ok) _detachFinalizer();
  return ok;
}