#include "btree.h"
int bdelky(BTA* btact, char* key);
The bdelky function deletes a key from
the current root in the file associated with the
btact context pointer. The key, a
character string, is passed via the pointer in
key. If the key does not exist,
bdelky returns the error code
QNOKEY. bdelky
returns zero on successful deletion of a key.
If bdelky is called with a
key value of NULL, the delete operation
will act against the current key, as selected by
bfndky, bnxtky or
bprvky operations. This capability is
designed to allow deletion of a duplicate key, presumably
based on other, application managed, attributes. Note that this
capability is prohibited when duplicate keys exist and the
index has been opened shared. Exclusive access must be gained
via btlock
function in this case.
Invoking bdelky will invalidate the
current context, i.e. bnxtky or
bprvky will not operate.
A non-zero return from bdelky indicates
an error occurred during the key deletion process.