package dokeysto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val create : filename -> t

create fn create in read-write mode the persistent hashtbl whose data are stored compressed in file fn and whose index is stored in fn ^ ".idx".

val open_existing : filename -> t

open_existing fn open in read-write mode the persistent hashtbl whose data are stored compressed in file fn and whose index is stored in fn ^ ".idx".

val close : t -> unit

close db close the previously opened db.

val sync : t -> unit

sync db sync to disk the data and metadata (index) of db.

val destroy : t -> unit

destroy db rm data and metadata files of db and clear db's index hashtbl.

val mem : t -> string -> bool

mem db k check if k is bound in db.

val add : t -> string -> string -> unit

add db k v add the key-value binding (k,v) to db. v is compressed on the fly.

val replace : t -> string -> string -> unit

replace db k v replace the current binding for k in db by a binding from k to v. v is compressed on the fly. Cf. Hashtbl.replace for details.

val remove : t -> string -> unit

remove tbl k remove the current binding for k in db. Cf. Hashtbl.replace for details.

val find : t -> string -> string

find db k get and uncompress the current binding of k in db or raise Not_found.

val iter : (string -> string -> unit) -> t -> unit

iter f db apply f to all key-value pairs in db. Values are uncompressed on the fly. Cf. Hashtbl.iter for details.

val fold : (string -> string -> 'a -> 'a) -> t -> 'a -> 'a

fold f db init fold f over all key-value pairs in db. Values are uncompressed on the fly. Cf. Hashtbl.fold for details.

OCaml

Innovation. Community. Security.