cdb find - part-cw/lambdanative GitHub Wiki

(cdb-find cdb key)

Returns the value associated with a key in the constant database, or #f if none exists.

Parameter Description
cdb Constant database handle returned by init-cdb
key arbitrary scheme object to use for query

Example:

> (define cdbm (make-cdb "test.cdb"))
> (cdb-make-add cdbm "A" 1)
> (cdb-make-exists cdbm "A")
#t
> (cdb-make-exists cdbm "B")
#f
> (cdb-make-finish cdbm)
> (define cdb (init-cdb "test.cdb"))
> (cdb-find cdb "A")
1
> (cdb-find cdb "B")
#f
> (cdb-finish cdb)