mdb_set_relfunc function

int mdb_set_relfunc(
  1. Pointer<MDB_txn> txn,
  2. int dbi,
  3. Pointer<MDB_rel_func> rel
)

@brief Set a relocation function for a #MDB_FIXEDMAP database.

@todo 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. @paramin txn A transaction handle returned by #mdb_txn_begin() @paramin dbi A database handle returned by #mdb_dbi_open() @paramin rel A #MDB_rel_func function @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>, MDB_dbi,
        ffi.Pointer<MDB_rel_func>)>('mdb_set_relfunc')
external int mdb_set_relfunc(
  ffi.Pointer<MDB_txn> txn,
  int dbi,
  ffi.Pointer<MDB_rel_func> rel,
);