[][src]Function lmdb_sys::mdb_del

pub unsafe extern "C" fn mdb_del(
    txn: *mut MDB_txn,
    dbi: MDB_dbi,
    key: *mut MDB_val,
    data: *mut MDB_val
) -> c_int

@brief 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 NULL, 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 return #MDB_NOTFOUND if the specified key/data pair is not in the database. @param[in] txn A transaction handle returned by #mdb_txn_begin() @param[in] dbi A database handle returned by #mdb_dbi_open() @param[in] key The key to delete from the database @param[in] data The data to delete @return A non-zero error value on failure and 0 on success. Some possible errors are:

  • EACCES - an attempt was made to write in a read-only transaction.
  • EINVAL - an invalid parameter was specified.