libmdbx  0.11.6.39 (2022-04-13T11:05:50+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
B-tree Traversal

This is internal API for mdbx_chk tool. You should avoid to use it, except some extremal special cases. More...

Macros

#define MDBX_PGWALK_MAIN   ((const char *)((ptrdiff_t)0))
 Pseudo-name for MainDB. More...
 
#define MDBX_PGWALK_GC   ((const char *)((ptrdiff_t)-1))
 Pseudo-name for GarbageCollectorDB. More...
 
#define MDBX_PGWALK_META   ((const char *)((ptrdiff_t)-2))
 Pseudo-name for MetaPages. More...
 

Typedefs

typedef enum MDBX_page_type_t MDBX_page_type_t
 
typedef int MDBX_pgvisitor_func(const uint64_t pgno, const unsigned number, void *const ctx, const int deep, const char *const dbi, const size_t page_size, const MDBX_page_type_t type, const MDBX_error_t err, const size_t nentries, const size_t payload_bytes, const size_t header_bytes, const size_t unused_bytes) MDBX_CXX17_NOEXCEPT
 Callback function for traverse the b-tree. More...
 

Enumerations

enum  MDBX_page_type_t {
  MDBX_page_broken, MDBX_page_meta, MDBX_page_large, MDBX_page_branch,
  MDBX_page_leaf, MDBX_page_dupfixed_leaf, MDBX_subpage_leaf, MDBX_subpage_dupfixed_leaf,
  MDBX_subpage_broken
}
 Page types for traverse the b-tree. More...
 

Functions

LIBMDBX_API int mdbx_env_pgwalk (MDBX_txn *txn, MDBX_pgvisitor_func *visitor, void *ctx, bool dont_check_keys_ordering)
 B-tree traversal function. More...
 
LIBMDBX_API int mdbx_env_open_for_recovery (MDBX_env *env, const char *pathname, unsigned target_meta, bool writeable)
 Open an environment instance using specific meta-page for checking and recovery. More...
 
LIBMDBX_API int mdbx_env_turn_for_recovery (MDBX_env *env, unsigned target_meta)
 Turn database to the specified meta-page. More...
 

Detailed Description

This is internal API for mdbx_chk tool. You should avoid to use it, except some extremal special cases.

Macro Definition Documentation

◆ MDBX_PGWALK_GC

#define MDBX_PGWALK_GC   ((const char *)((ptrdiff_t)-1))

Pseudo-name for GarbageCollectorDB.

◆ MDBX_PGWALK_MAIN

#define MDBX_PGWALK_MAIN   ((const char *)((ptrdiff_t)0))

Pseudo-name for MainDB.

◆ MDBX_PGWALK_META

#define MDBX_PGWALK_META   ((const char *)((ptrdiff_t)-2))

Pseudo-name for MetaPages.

Typedef Documentation

◆ MDBX_page_type_t

◆ MDBX_pgvisitor_func

typedef int MDBX_pgvisitor_func(const uint64_t pgno, const unsigned number, void *const ctx, const int deep, const char *const dbi, const size_t page_size, const MDBX_page_type_t type, const MDBX_error_t err, const size_t nentries, const size_t payload_bytes, const size_t header_bytes, const size_t unused_bytes) MDBX_CXX17_NOEXCEPT

Callback function for traverse the b-tree.

See also
mdbx_env_pgwalk()

Enumeration Type Documentation

◆ MDBX_page_type_t

Page types for traverse the b-tree.

See also
mdbx_env_pgwalk()
MDBX_pgvisitor_func
Enumerator
MDBX_page_broken 
MDBX_page_meta 
MDBX_page_large 
MDBX_page_branch 
MDBX_page_leaf 
MDBX_page_dupfixed_leaf 
MDBX_subpage_leaf 
MDBX_subpage_dupfixed_leaf 
MDBX_subpage_broken 

Function Documentation

◆ mdbx_env_open_for_recovery()

LIBMDBX_API int mdbx_env_open_for_recovery ( MDBX_env env,
const char *  pathname,
unsigned  target_meta,
bool  writeable 
)

Open an environment instance using specific meta-page for checking and recovery.

This function mostly of internal API for mdbx_chk utility and subject to change at any time. Do not use this function to avoid shooting your own leg(s).

◆ mdbx_env_pgwalk()

LIBMDBX_API int mdbx_env_pgwalk ( MDBX_txn txn,
MDBX_pgvisitor_func visitor,
void *  ctx,
bool  dont_check_keys_ordering 
)

B-tree traversal function.

◆ mdbx_env_turn_for_recovery()

LIBMDBX_API int mdbx_env_turn_for_recovery ( MDBX_env env,
unsigned  target_meta 
)

Turn database to the specified meta-page.

This function mostly of internal API for mdbx_chk utility and subject to change at any time. Do not use this function to avoid shooting your own leg(s).