+I+Berkeley DB: DBcursor->c_del[P

DBcursor->c_del





#include <db.h>

int.DBcursor->c_del(DBC *cursor, u_int32_t flags);





Description



NThe DBcursor->c_del function deletes the key/data pair currently referenced by the cursor.

EThe flags parameter is currently unused, and must be set to 0.

HThe cursor position is unchanged after a delete, and subsequent calls toGcursor functions expecting the cursor to reference an existing key willfail.

DIf the element has already been deleted, DBcursor->c_del will return DB_KEYEMPTY.

9If the cursor is not yet initialized, the DBcursor->c_delfunction will return EINVAL.

Otherwise, the DBcursor->c_delHfunction returns the value of errno on failure, and 0 on success.



Errors

XIf a fatal error occurs in Berkeley DB, the DBcursor->c_del function may fail and returnFDB_RUNRECOVERY, at which point all subsequent database calls will alsoreturn DB_RUNRECOVERY.

The DBcursor->c_del)function may fail and return errnoKfor any of the errors specified for the following Berkeley DB and C library functions:__account_page(3),dbenv->db_paniccall(3), fflush(3), fprintf(3),free(3),func(3),6lock_get,3lock_put,6lock_vec,1log_put, malloc(3), memcpy(3), memmove(3),9memp_fget,9memp_fput,9memp_fset, memset(3), realloc(3), strerror(3), vfprintf(3),and vsnprintf(3).

In addition, the DBcursor->c_del)function may fail and return errnofor the following conditions:

(

EAGAIN
A lock was unavailable.


B

EINVAL
An invalid flag value or parameter was specified.







See Also

8db_appexit,8db_appinit,8db_version,2DB->close,4DB->cursor,.DB->del,,DB->fd,.DB->get,/db_open,.DB->put,0DB->stat,0DB->sync,;DBcursor->c_close,DBcursor->c_del,6DBcursor->c_getand7DBcursor->c_put.
ÿÿ