chickadee » lmdb-lolevel » mdb-cursor-get

mdb-cursor-get cursor key data opprocedure

Retrieve by cursor.

This procedure mostly follows the C API for mdb_cursor_get but does not modify the key and data paramters to return data - instead call (mdb-cursor-key) and (mdb-cursor-data) after this function to access the current key/data values for the cursor.

cursor
A cursor handle returned by (mdb-cursor-open)
key
The key to look up (if #f do not modify the cursors current key value)
data
The data to look up (useful for dupsort databases, if #f do not modify the cursors current value)
op
A cursor operation MDB_cursor_op (see Cursor Operatios in Constants)
(exn lmdb MDB_NOTFOUND)
no matching key found.
(exn lmdb EINVAL)
an invalid parameter was specified.