mdb(3)
β¨ mdb(3) β the LMDB API page, but make it make sense π
okay bestie, gather round, because this is the mdb(3) page from the Library Functions Manual, and it's literally the doorway to the whole OpenLDAP Lightning Memory-Mapped Database Manager. yes. all of it. she's iconic, she's fast, she's memory-mapped, and we're gonna read her together π«Ά
π NAME π
mdb β the LMDB API.
That's it. That's the name. She's the OpenLDAP Lightning Memory-Mapped Database Manager and she does not need a long intro, she just is π
β¨ SYNOPSIS β¨
π¦ Topics π¦
the whole little constellation of topics living on this page:
- Version Macros
- Environment Flags
- Database Flags
- Write Flags
π§ Data Structures π§
struct MDB_valβ a generic structure used for passing keys and data in and out of the database. lowkey the little envelope everything travels in π
π Typedefs π
typedef unsigned int MDB_dbiβ a handle for an individual database in the DB environment.typedef int MDB_cmp_func(const MDB_val *a, const MDB_val *b)β a callback function used to compare two keys in a database.typedef void MDB_rel_func(MDB_val *item, void *oldptr, void *newptr, void *relctx)β a callback function used to relocate a position-dependent data item in a fixed-address database.
π Detailed Description π
OpenLDAP Lightning Memory-Mapped Database Manager.
periodt. that's the vibe, that's the whole thing π
πΈ Data Structure Documentation πΈ
struct MDB_val π
Generic structure used for passing keys and data in and out of the database.
now pay attention because this part is important, fr fr:
Values returned from the database are valid only until a subsequent update operation, or the end of the transaction. Do not modify or free them β they commonly point into the database itself.
so likeβ¦ those values? not yours. don't touch, don't free, don't get attached π
Key sizes must be between 1 and mdb_env_get_maxkeysize() inclusive. The exact same rule applies to data sizes in databases with the MDB_DUPSORT flag. Other data items can in theory be from 0 to 0xffffffff bytes long π
π¦ Data Fields π¦
size_t mv_sizevoid * mv_data
π Typedef Documentation π
typedef void MDB_rel_func(MDB_val *item, void *oldptr, void *newptr, void *relctx) π«
A callback function used to relocate a position-dependent data item in a fixed-address database. Let me break this down bestie:
newptrgives the item's desired address in the memory mapoldptrgives its previous address- the item's actual data resides at the address in
item
This callback is expected to walk through the fields of the record in item and modify any values based at the oldptr address to be relative to the newptr address. it's giving β¨relocation eraβ¨
Parameters π«Ά
- item β the item that is to be relocated.
- oldptr β the previous address.
- newptr β the new address to relocate to.
- relctx β an application-provided context, set by
mdb_set_relctx().
π Todo π
This feature is currently unimplemented.
so don't come for me, she said what she said π
β Author β
Generated automatically by Doxygen for LMDB from the source code.
aaaand that's the whole page, bestie!! π¦ this came to you straight from LMDB, wearing her cutest little mdb(3) section-3 library-functions fit, and she ate, no crumbs π
β¨
π¦ where this page comes from
- ubuntu resolute: lmdb-doc 0.9.31-1build2 Β· OpenLDAP-2.8
- ubuntu stonking: lmdb-doc 0.9.35-1 Β· OpenLDAP-2.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms