hs-cdb-0.1.2: A library for reading CDB (Constant Database) files.
Safe HaskellSafe-Inferred
LanguageHaskell98

Database.CDB.Write

Synopsis

Documentation

type CDBMake = StateT CDBMakeState IO () Source #

cdbMake :: FilePath -> CDBMake -> IO () Source #

Construct a CDB as described inside the supplied CDBMake computation. During construction, it will be written to a temporary file and then moved over top of the given file atomically.

cdbAdd :: (Packable k, Packable v) => k -> v -> CDBMake Source #

Adds a given key-value pair to the CDB being built.

cdbAddMany :: (Packable k, Packable v) => [(k, v)] -> CDBMake Source #

Add a list of key-value pairs to the CDB being built.