hs-cdb-0.1.1: A library for reading CDB (Constant Database) files.

Database.CDB.Read

Synopsis

Documentation

data CDB Source

Internal representation of a CDB file on disk.

cdbInit :: FilePath -> IO CDBSource

Loads a CDB from a file.

cdbGet :: (Packable k, Unpackable v) => CDB -> k -> Maybe vSource

Finds the first entry associated with a key in a CDB.

cdbGetAll :: (Packable k, Unpackable v) => CDB -> k -> [v]Source

Finds all entries associated with a key in a CDB.

cdbHasKey :: Packable k => CDB -> k -> BoolSource

Returns True if the CDB has a value associated with the given key.

cdbCount :: Packable k => CDB -> k -> IntSource

Returns the number of values a CDB has for a given key.