commit method

Future<void> commit()

Commits 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> commit() async {
  _throwWhenNotTransaction('Session is not a transaction');
  _throwOnNullHandle('Cannot commit a closed session');

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