mdb_put(3)
π mdb_put(3) β Write Flags π
okay bestie, welcome to the Library Functions Manual, this is the mdb_put page and it's giving flags energy. it's not a function, it's not a program β it's a whole lil' vibes-dump of macros and variables that the LMDB docs bundle together under the name mdb_put. let's get into it. π¦
β¨ NAME β¨
mdb_put β Write Flags βοΈ
no cap, that's literally it. it's the write flags, the little #defines you sprinkle on your puts and your cursor puts so the database knows what kind of moment you're having.
πΈ SYNOPSIS πΈ
π Topics
- Copy Flags β yes bestie, there's a whole topic just sitting here called that
π Macros
these are the icons themselves, verbatim, do not touch:
#define MDB_NOOVERWRITE 0x10
#define MDB_NODUPDATA 0x20
#define MDB_CURRENT 0x40
#define MDB_RESERVE 0x10000
#define MDB_APPEND 0x20000
#define MDB_APPENDDUP 0x40000
#define MDB_MULTIPLE 0x80000
π Variables
and here's the full roster of struct members that also live on this page for some reason. they didn't get their own page, so they're crashing here:
size_t MDB_val::mv_sizevoid * MDB_val::mv_dataunsigned int MDB_stat::ms_psizeunsigned int MDB_stat::ms_depthsize_t MDB_stat::ms_branch_pagessize_t MDB_stat::ms_leaf_pagessize_t MDB_stat::ms_overflow_pagessize_t MDB_stat::ms_entriesvoid * MDB_envinfo::me_mapaddrsize_t MDB_envinfo::me_mapsizesize_t MDB_envinfo::me_last_pgnosize_t MDB_envinfo::me_last_txnidunsigned int MDB_envinfo::me_maxreadersunsigned int MDB_envinfo::me_numreaders
π Detailed Description π
π LMDB Command Line Tools π
so here's the thing β this page also shouts out the command line tools that ship with LMDB. here's the whole squad, no one gets left out:
mdb_copyβ environment copy tool πmdb_dumpβ environment export tool π¦mdb_loadβ environment import tool π₯mdb_statβ environment status tool π
iconic lineup honestly. main character energy across the board.
π Macro Definition Documentation π
π #define MDB_NOOVERWRITE 0x10
for put: don't write if the key already exists. like, if it's already there, leave it alone, we're not re-doing the bit. π
π #define MDB_NODUPDATA 0x20
only for MDB_DUPSORT. okay so there are two moods here:
- for put: don't write if the key and data pair already exist. same pair = we already have it, don't do it again.
- for
mdb_cursor_del: remove all duplicate data items. all of them. periodt. π§Ή
π #define MDB_CURRENT 0x40
for mdb_cursor_put: overwrite the current key/data pair. right here, right now, over the one you're sitting on. π₯
π #define MDB_RESERVE 0x10000
for put: just reserve space for the data, don't copy it. and it hands you back a pointer to that reserved space so you can go fill it in yourself. it's giving diy. β¨
π #define MDB_APPEND 0x20000
data is being appended, so don't split full pages. π
π #define MDB_APPENDDUP 0x40000
duplicate data is being appended, so don't split full pages. π«Ά
π #define MDB_MULTIPLE 0x80000
store multiple data items in one single call. only for MDB_DUPFIXED though β don't try it elsewhere bestie. π
π¦ Variable Documentation π¦
πΈ size_t MDB_val::mv_size
size of the data item π
πΈ void* MDB_val::mv_data
address of the data item π
πΈ unsigned int MDB_stat::ms_psize
size of a database page. and yes, this is currently the same for all databases. no favours. β¨
πΈ unsigned int MDB_stat::ms_depth
depth (height) of the B-tree π³
πΈ size_t MDB_stat::ms_branch_pages
number of internal (non-leaf) pages π
πΈ size_t MDB_stat::ms_leaf_pages
number of leaf pages π
πΈ size_t MDB_stat::ms_overflow_pages
number of overflow pages π
πΈ size_t MDB_stat::ms_entries
number of data items π’
πΈ void* MDB_envinfo::me_mapaddr
address of map, if fixed πΊοΈ
πΈ size_t MDB_envinfo::me_mapsize
size of the data memory map π
πΈ size_t MDB_envinfo::me_last_pgno
ID of the last used page π
πΈ size_t MDB_envinfo::me_last_txnid
ID of the last committed transaction β
πΈ unsigned int MDB_envinfo::me_maxreaders
max reader slots in the environment ποΈ
πΈ unsigned int MDB_envinfo::me_numreaders
max reader slots used in the environment ποΈβ¨
π Author π
generated automatically by Doxygen for LMDB from the source code. the robot did it, i just made it cute. π
and that's the whole page bestie, every flag, every struct member, nothing skipped, iykyk π«Ά
this lil' rewrite came to you from LMDB β the mdb_put(3) page, and that's the version and date situation, fr fr. slay, go write some flags. π
πβ
π¦ 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