mdb_cursor_renew function
@brief Renew a cursor handle.
A cursor is associated with a specific transaction and database.
Cursors that are only used in read-only
transactions may be re-used, to avoid unnecessary malloc/free overhead.
The cursor may be associated with a new read-only transaction, and
referencing the same database handle as it was created with.
This may be done whether the previous transaction is live or dead.
@paramin
txn A transaction handle returned by #mdb_txn_begin()
@paramin
cursor A cursor handle returned by #mdb_cursor_open()
@return A non-zero error value on failure and 0 on success. Some possible
errors are:
- EINVAL - an invalid parameter was specified.
Implementation
@ffi.FfiNative<ffi.Int Function(ffi.Pointer<MDB_txn>, ffi.Pointer<MDB_cursor>)>(
'mdb_cursor_renew')
external int mdb_cursor_renew(
ffi.Pointer<MDB_txn> txn,
ffi.Pointer<MDB_cursor> cursor,
);