package dokeysto_camltc

  1. Overview
  2. Docs

Module Db_camltc_gen.RWSource

Parameters

Signature

Sourcetype t
Sourceval create : filename -> t

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

Sourceval open_existing : filename -> t

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

Sourceval dummy : unit -> t

dummy () create a value of type t. Do not do anything with this value.

Sourceval close : t -> unit

close db close the previously opened db.

Sourceval sync : t -> unit

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

Sourceval destroy : t -> unit

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

Sourceval mem : t -> 'k -> bool

mem db k check if k is bound in db.

Sourceval add : t -> 'k -> 'v -> unit

add db k v add the key-value binding (k,v) to db.

Sourceval replace : t -> 'k -> 'v -> unit

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

Sourceval remove : t -> 'k -> unit

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

Sourceval find : t -> 'k -> 'v

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

Sourceval iter : ('k -> 'v -> unit) -> t -> unit

iter f db apply f to all key-value pairs in db. Cf. Hashtbl.iter for details.

Sourceval fold : ('k -> 'v -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f db init fold f over all key-value pairs in db. Cf. Hashtbl.fold for details.

OCaml

Innovation. Community. Security.