kdbm_store - Add a new key/data pair to the database.
LIBRARY CALL
int kdbm_store(
kdbm *dbf,
kdatum key,
kdatum content,
int flags)
INPUT
dbf - open database pointer
key - key to store the information under
content - data to store in the database
flags - data overwrite options
OUTPUT
none
RETURN VALUE
0 on success, -1 otherwise
DESCRIPTION
Add a new element to the database. CONTENT is keyed
by KEY. The file on disk is updated to reflect the
structure of the new database before returning from
this procedure. The FLAGS define the action to take
when the KEY is already in the database. The value
KDBM_REPLACE asks that the old data be replaced by
the new CONTENT. The value KDBM_INSERT asks that an
error be returned and no action taken. A return
value of 0 means no errors. A return value of -1
means that the item was not stored in the data base
because the caller was not an official writer. A
return value of 0 means that the item was not stored
because the argument FLAGS was KDBM_INSERT and the
KEY was already in the database.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/klibdb/src/kdbm.c
SEE ALSO
klibdb(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.