File mdbx.h
Go to the source code of this file
The libmdbx C API header file. More...
#include <stdarg.h>#include <stddef.h>#include <stdint.h>#include <assert.h>#include <errno.h>#include <pthread.h>#include <sys/types.h>#include <sys/uio.h>
Classes
| Type | Name |
|---|---|
| struct | MDBX_build_info libmdbx build information |
| struct | MDBX_cache_entry_t Lightweight transparent cache entry structure used by mdbx_cache_get() . |
| struct | MDBX_cache_result_t Pair of error code and cache status as a result of mdbx_cache_get() . |
| struct | MDBX_canary The four integer markers (aka "canary") associated with the environment. |
| struct | MDBX_chk_callbacks_t A set of callback functions used for checking the integrity of a database. |
| struct | MDBX_chk_context_t The context for checking the integrity of a database. |
| struct | MDBX_chk_context_t.result |
| struct | MDBX_chk_histogram A histogram with some statistical information collected during a database integrity check. |
| struct | MDBX_chk_histogram.ranges |
| struct | MDBX_chk_issue_t An issue was discovered during a database integrity check. |
| struct | MDBX_chk_line_t A virtual row of the report generated during a database integrity check. |
| struct | MDBX_chk_scope_t A hierarchical context during a database integrity check. |
| struct | MDBX_chk_table_t Information about a certain key-value table during a database integrity check. |
| struct | MDBX_chk_table_t.histogram |
| struct | MDBX_chk_table_t.pages |
| struct | MDBX_commit_latency Latency of commit stages in 1/65536 of seconds units. |
| struct | MDBX_commit_latency.gc_prof Information for GC profiling. |
| struct | MDBX_commit_latency.gc_prof.pnl_merge_self Metrics of the amount of work and cost of merging lists of pages. |
| struct | MDBX_commit_latency.gc_prof.pnl_merge_work Metrics of the amount of work and cost of merging lists of pages. |
| struct | MDBX_defrag_result_t The numerical metrics of progress and result of database defragmentation. |
| struct | MDBX_envinfo Information about the environment. |
| struct | MDBX_envinfo.mi_bootid A mostly unique ID that is regenerated on each boot. |
| struct | MDBX_envinfo.mi_bootid.current |
| struct | MDBX_envinfo.mi_bootid.meta |
| struct | MDBX_envinfo.mi_dxbid |
| struct | MDBX_envinfo.mi_geo |
| struct | MDBX_envinfo.mi_pgop_stat |
| struct | MDBX_gc_info_t Information about Garbage Collection and page usage. |
| struct | MDBX_gc_info_t.gc_reclaimable |
| struct | MDBX_stat Statistics for a table in the environment. |
| struct | MDBX_txn_info Information about the transaction. |
| struct | MDBX_version_info libmdbx version information, |
| struct | MDBX_version_info.git |
Public Types
| Type | Name |
|---|---|
| union | MDBX_chk_scope_t.usr_o |
| union | MDBX_chk_scope_t.usr_v |
| union | MDBX_chk_scope_t.usr_z |
Macros
| Type | Name |
|---|---|
| define | LIBMDBX_H |
| define | MDBX_CHK_GC ((void \*)((ptrdiff\_t)-1))Pseudo-name for GarbageCollectorDB. |
| define | MDBX_CHK_MAIN ((void \*)((ptrdiff\_t)0))Pseudo-name for MainDB. |
| define | MDBX_CHK_META ((void \*)((ptrdiff\_t)-2))Pseudo-name for MetaPages. |
Detailed Description
This file is part of the libmdbx amalgamated source code (v0.15.0-39-g6077858c at 2026-10-10T21:38:29Z).
libmdbx (aka MDBX) is an extremely fast, compact, powerful, embeddable, transactional key-value store, with Apache 2.0 license. MDBX has a specific set of properties and capabilities, focused on creating unique lightweight solutions with extraordinary performance.
libmdbx is superior to LMDB in terms of features and reliability, not inferior in performance. In comparison to LMDB, libmdbx makes many things just work perfectly, not silently and catastrophically break down. libmdbx supports Linux, Windows, MacOS, OSX, Harmony, iOS, Android, FreeBSD, DragonFly, Solaris, OpenSolaris, OpenIndiana, NetBSD, OpenBSD and other systems compliant with POSIX.1-2008.
Please visit https://libmdbx.dqdkfa.ru for more information, documentation, C++ API description and links to the origin git repo with the source code. Questions, feedback and suggestions are welcome to the Telegram' group https://t.me/libmdbx, MAX' chat https://max.ru/join/dKckvyuARxp1vRK-wnPur8zYCEkbR3OUOmpPWkWxp78.
Donations are welcome to ETH 0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A, BTC bc1qzvl9uegf2ea6cwlytnanrscyv8snwsvrc0xfsu, SOL FTCTgbHajoLVZGr8aEFWMzx3NDMyS5wXJgfeMTmJznRi. Всё будет хорошо!
The libmdbx project has been completely relocated to the jurisdiction of the Russian Federation.
Note:
libmdbx is still open and provided with first-class free support.
LICENSE & COPYRIGHT
Copyright:
SPDX-License-Identifier: Apache-2.0 Please refer to the COPYRIGHT file for explanation of license change, credits and acknowledgments.
Author:
Леонид Юрьев aka Leonid Yuriev leo@yuriev.ru
Date:
2015-2026
Public Types Documentation
union MDBX_chk_scope_t.usr_o
union MDBX_chk_scope_t.usr_v
union MDBX_chk_scope_t.usr_z
Macro Definition Documentation
define LIBMDBX_H
#define LIBMDBX_H
define MDBX_CHK_GC
Pseudo-name for GarbageCollectorDB.
#define MDBX_CHK_GC `((void *)((ptrdiff_t)-1))`
define MDBX_CHK_MAIN
Pseudo-name for MainDB.
#define MDBX_CHK_MAIN `((void *)((ptrdiff_t)0))`
define MDBX_CHK_META
Pseudo-name for MetaPages.
#define MDBX_CHK_META `((void *)((ptrdiff_t)-2))`
The documentation for this class was generated from the following file docs/mdbx.h