]> git.sur5r.net Git - openldap/blobdiff - libraries/libmdb/mdb.h
More pgno alignment tweaks
[openldap] / libraries / libmdb / mdb.h
index af82e566addb628b550f85e278fe761d4dde854d..9075c41e0c6d929f0556fdca2aed1d9df7e348dd 100644 (file)
@@ -189,6 +189,14 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel
 #define MDB_NODUPDATA  0x20
 /** For mdb_cursor_put: overwrite the current key/data pair */
 #define MDB_CURRENT    0x40
+/** For put: Just reserve space for data, don't copy it. Return a
+ * pointer to the reserved space.
+ */
+#define MDB_RESERVE    0x10000
+/** Data is being appended, don't split full pages. */
+#define MDB_APPEND     0x20000
+/** Store multiple data items in one call. */
+#define MDB_MULTIPLE   0x40000
 /*     @} */
 
 /** @brief Cursor Get operations.
@@ -842,6 +850,18 @@ int  mdb_cursor_open(MDB_txn *txn, MDB_dbi dbi, MDB_cursor **cursor);
         */
 void mdb_cursor_close(MDB_cursor *cursor);
 
+       /** @brief Return the cursor's transaction handle.
+        *
+        * @param[in] cursor A cursor handle returned by #mdb_cursor_open()
+        */
+MDB_txn *mdb_cursor_txn(MDB_cursor *cursor);
+
+       /** @brief Return the cursor's database handle.
+        *
+        * @param[in] cursor A cursor handle returned by #mdb_cursor_open()
+        */
+MDB_dbi mdb_cursor_dbi(MDB_cursor *cursor);
+
        /** @brief Retrieve by cursor.
         *
         * This function retrieves key/data pairs from the database. The address and length