chickadee » lmdb-lolevel » mdb-del

mdb-del txn dbi key #!optional dataprocedure

Delete items from a database.

This function removes key/data pairs from the database. If the database does not support sorted duplicate data items (MDB_DUPSORT) the data parameter is ignored. If the database supports sorted duplicates and the data parameter is #f, all of the duplicate data items for the key will be deleted. Otherwise, if the data parameter is non-NULL only the matching data item will be deleted. This function will raise an (exn lmdb MDB_NOTFOUND) condition if the specified key/data pair is not in the database.

A transaction handle returned by (mdb-txn-begin)
A database handle returned by (mdb-dbi-open)
The key to delete from the database (blob)
The data to delete (blob)

Some possible error conditions:

(exn lmdb EACCES)
an attempt was made to write in a read-only transaction.
(exn lmdb EINVAL)
an invalid parameter was specified.