Function lmdb_master_sys::mdb_cmp

source ·
pub unsafe extern "C" fn mdb_cmp(
    txn: *mut MDB_txn,
    dbi: MDB_dbi,
    a: *const MDB_val,
    b: *const MDB_val,
) -> c_int
Expand description

Compare two data items according to a particular database.

This returns a comparison as if the two data items were keys in the specified database.

§Arguments

  • txn (direction in) - A transaction handle returned by #mdb_txn_begin()
  • dbi (direction in) - A database handle returned by #mdb_dbi_open()
  • a (direction in) - The first item to compare
  • b (direction in) - The second item to compare

§Returns

< 0 if a < b, 0 if a == b, > 0 if a > b