mdb_set_relctx function

int mdb_set_relctx(
  1. Pointer<MDB_txn> txn,
  2. int dbi,
  3. Pointer<Void> ctx
)

@brief Set a context pointer for a #MDB_FIXEDMAP database's relocation function.

See #mdb_set_relfunc and #MDB_rel_func for more details. @paramin txn A transaction handle returned by #mdb_txn_begin() @paramin dbi A database handle returned by #mdb_dbi_open() @paramin ctx An arbitrary pointer for whatever the application needs. It will be passed to the callback function set by #mdb_set_relfunc as its \b relctx parameter whenever the callback is invoked. @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<ffi.Void>)>('mdb_set_relctx')
external int mdb_set_relctx(
  ffi.Pointer<MDB_txn> txn,
  int dbi,
  ffi.Pointer<ffi.Void> ctx,
);