mdb_stat function

int mdb_stat(
  1. Pointer<MDB_txn> txn,
  2. int dbi,
  3. Pointer<MDB_stat> stat
)

@brief Retrieve statistics for a database.

@paramin txn A transaction handle returned by #mdb_txn_begin() @paramin dbi A database handle returned by #mdb_dbi_open() @paramout stat The address of an #MDB_stat structure where the statistics will be copied @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_stat>)>('mdb_stat')
external int mdb_stat(
  ffi.Pointer<MDB_txn> txn,
  int dbi,
  ffi.Pointer<MDB_stat> stat,
);