mdb_txn_commit function

int mdb_txn_commit(
  1. Pointer<MDB_txn> txn
)

@brief Commit all the operations of a transaction into the database.

The transaction handle is freed. It and its cursors must not be used again after this call, except with #mdb_cursor_renew(). @note Earlier documentation incorrectly said all cursors would be freed. Only write-transactions free cursors. @paramin txn A transaction handle returned by #mdb_txn_begin() @return A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified.
  • ENOSPC - no more disk space.
  • EIO - a low-level I/O error occurred while writing.
  • ENOMEM - out of memory.

Implementation

@ffi.FfiNative<ffi.Int Function(ffi.Pointer<MDB_txn>)>('mdb_txn_commit')
external int mdb_txn_commit(
  ffi.Pointer<MDB_txn> txn,
);