.TH "mdb" 3 "Wed Aug 16 2023" "LMDB" \" -*- nroff -*- .ad l .nh .SH NAME mdb \- LMDB API .PP \- OpenLDAP Lightning Memory-Mapped Database Manager\&. .SH SYNOPSIS .br .PP .SS "Modules" .in +1c .ti -1c .RI "\fBVersion Macros\fP" .br .ti -1c .RI "\fBEnvironment Flags\fP" .br .ti -1c .RI "\fBDatabase Flags\fP" .br .ti -1c .RI "\fBWrite Flags\fP" .br .in -1c .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBMDB_val\fP" .br .RI "Generic structure used for passing keys and data in and out of the database\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef unsigned int \fBMDB_dbi\fP" .br .RI "A handle for an individual database in the DB environment\&. " .ti -1c .RI "typedef int() \fBMDB_cmp_func\fP(const \fBMDB_val\fP *a, const \fBMDB_val\fP *b)" .br .RI "A callback function used to compare two keys in a database\&. " .ti -1c .RI "typedef void() \fBMDB_rel_func\fP(\fBMDB_val\fP *item, void *oldptr, void *newptr, void *relctx)" .br .RI "A callback function used to relocate a position-dependent data item in a fixed-address database\&. " .in -1c .SH "Detailed Description" .PP OpenLDAP Lightning Memory-Mapped Database Manager\&. .SH "Data Structure Documentation" .PP .SH "struct MDB_val" .PP Generic structure used for passing keys and data in and out of the database\&. 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\&. .PP Key sizes must be between 1 and \fBmdb_env_get_maxkeysize()\fP inclusive\&. The same applies to data sizes in databases with the \fBMDB_DUPSORT\fP flag\&. Other data items can in theory be from 0 to 0xffffffff bytes long\&. .PP .in -1c .RI "\fBData Fields\fP" .in +1c .in +1c .ti -1c .RI "size_t \fBmv_size\fP" .br .ti -1c .RI "void * \fBmv_data\fP" .br .in -1c .SH "Typedef Documentation" .PP .SS "typedef void() MDB_rel_func(\fBMDB_val\fP *item, void *oldptr, void *newptr, void *relctx)" .PP A callback function used to relocate a position-dependent data item in a fixed-address database\&. The \fBnewptr\fP gives the item's desired address in the memory map, and \fBoldptr\fP gives its previous address\&. The item's actual data resides at the address in \fBitem\fP\&. This callback is expected to walk through the fields of the record in \fBitem\fP and modify any values based at the \fBoldptr\fP address to be relative to the \fBnewptr\fP address\&. .PP \fBParameters\fP .RS 4 \fIitem\fP The item that is to be relocated\&. .br \fIoldptr\fP The previous address\&. .br \fInewptr\fP The new address to relocate to\&. .br \fIrelctx\fP An application-provided context, set by \fBmdb_set_relctx()\fP\&. .RE .PP \fBTodo\fP .RS 4 This feature is currently unimplemented\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for LMDB from the source code\&.