Symisc Vedis

An Embeddable Datastore Engine

Vedis C/C++ API Reference - DBM Methods.


int vedis_kv_delete(vedis *pStore,const void *pKey,int nKeyLen);

Inside foreign command via call context:

int vedis_context_kv_delete(vedis_context *pCtx,const void *pKey,int nKeyLen);

Remove a record from the database.


To remove a particular record from the database, you can use this high-level thread-safe routine to perform the deletion.

The vedis_context_kv() family of functions is similar to their standard counterpart (i.e. vedis_kv_()) except that they expect a vedis_context pointer as their first argument which mean that they are designed to be invoked only from a foreign command.



Vedis datastore handle.

Record key.

pKey length. If the nKeyLen argument is less than zero, then pKey is read up to the first zero terminator. If nKeyLen is non-negative, then it is the maximum number of bytes read from pKey.

Return value

VEDIS_OK is returned on success. Any other return value indicates failure such as:

VEDIS_NOTFOUND: Nonexistent record.

VEDIS_BUSY: Another thread or process have an exclusive lock on the database. In this case, the caller should wait until the lock holder relinquish it.

VEDIS_IOERR: OS specific error.

For a human-readable error message, you can extract the database error log via vedis_config() with a configuration verb set to VEDIS_CONFIG_ERR_LOG.

See also

vedis_kv_append, vedis_kv_fetch, vedis_kv_store, vedis_open, vedis_close, vedis_config.

Symisc Systems
Copyright © Symisc Systems