lmdb_master_sys

Function mdb_set_relfunc

Source
pub unsafe extern "C" fn mdb_set_relfunc(
    txn: *mut MDB_txn,
    dbi: MDB_dbi,
    rel: MDB_rel_func,
) -> c_int
Expand description

Set a relocation function for a #MDB_FIXEDMAP database.

The relocation function is called whenever it is necessary to move the data of an item to a different position in the database (e.g. through tree balancing operations, shifts as a result of adds or deletes, etc.). It is intended to allow address/position-dependent data items to be stored in a database in an environment opened with the #MDB_FIXEDMAP option. Currently the relocation feature is unimplemented and setting this function has no effect.

§Arguments

  • txn (direction in) - A transaction handle returned by #mdb_txn_begin()
  • dbi (direction in) - A database handle returned by #mdb_dbi_open()
  • rel (direction in) - A #MDB_rel_func function

§Returns

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

  • EINVAL - an invalid parameter was specified.