Function lmdb_master_sys::mdb_cursor_get

source ·
pub unsafe extern "C" fn mdb_cursor_get(
    cursor: *mut MDB_cursor,
    key: *mut MDB_val,
    data: *mut MDB_val,
    op: MDB_cursor_op,
) -> c_int
Expand description

Retrieve by cursor.

This function retrieves key/data pairs from the database. The address and length of the key are returned in the object to which key refers (except for the case of the #MDB_SET option, in which the key object is unchanged), and the address and length of the data are returned in the object to which data refers. See #mdb_get() for restrictions on using the output values.

§Arguments

  • cursor (direction in) - A cursor handle returned by #mdb_cursor_open()
  • key (direction in, out) - The key for a retrieved item
  • data (direction in, out) - The data of a retrieved item
  • op (direction in) - A cursor operation #MDB_cursor_op

§Returns

A non-zero error value on failure and 0 on success. Some possible errors are:

  • #MDB_NOTFOUND - no matching key found.
  • EINVAL - an invalid parameter was specified.