pub unsafe extern "C" fn mdb_cursor_open(
    txn: *mut MDB_txn,
    dbi: MDB_dbi,
    cursor: *mut *mut MDB_cursor
) -> c_int
Expand description

@brief Create a cursor handle.

A cursor is associated with a specific transaction and database. A cursor cannot be used when its database handle is closed. Nor when its transaction has ended, except with #mdb_cursor_renew(). It can be discarded with #mdb_cursor_close(). A cursor in a write-transaction can be closed before its transaction ends, and will otherwise be closed when its transaction ends. A cursor in a read-only transaction must be closed explicitly, before or after its transaction ends. It can be reused with #mdb_cursor_renew() before finally closing it. @note Earlier documentation said that cursors in every transaction were closed when the transaction committed or aborted. @param[in] txn A transaction handle returned by #mdb_txn_begin() @param[in] dbi A database handle returned by #mdb_dbi_open() @param[out] cursor Address where the new #MDB_cursor handle will be stored @return A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified.