rollback method

Future<void> rollback()

Rolls back the current transaction and closes the session.

Throws an AskarSessionException if the session is not a transaction or if it is closed.

Implementation

Future<void> rollback() async {
  _throwWhenNotTransaction('Session is not a transaction');
  _throwOnNullHandle('Cannot rollback a closed session');

  await handle!.close(false);
  handle = null;
}