function

dbhash_delete . dbhash . sncode

VERSIONlatest Delete  a key from the database.

DBHASH_DELETE(1e)

NAME

dbhash_cdelete - Delete  a key from the database.

SYNOPSIS

dbhash_delete (db:pointer, key:string);

DESCRIPTION

This function delete a key from the database.

PARAMETERS

db
Pointer to database
key
Key

RETURN

 The return value is -1 if the item is not present or the requester is a reader.  The return value is 0 if there was a successful delete.

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module hash {
    Library : "/usr/local/lib/libsndbhash.so"
    Init : "sndbhash_init"
}

EXAMPLES

hash = dbhash_open("/hash/test.db");

ret = dbhash_put(db:hash,key:"cookie",value:"aurhfqiuwrhf");

dbhash_get(db:hash,key:"cookie");

if dbhash_exist(db:hash,key:"cookie") then dbhash_delete(db:hash,key:"cookie"); endif

dbhash_close(hash);

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>