Version 0.99.3
This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!
module Ocsipersist:Persistent data on hard disk.sig..end
type 'a t type store val open_store : string -> storeval make_persistent : store:store ->
name:string -> default:'a -> 'a t Lwt.tmake_persistent store name default find a persistent value named name in store store from database, or create it with the default value default if it does not exist.val make_persistent_lazy : store:store ->
name:string -> default:(unit -> 'a) -> 'a t Lwt.tval get : 'a t -> 'a Lwt.tget pv gives the value of pvval set : 'a t -> 'a -> unit Lwt.tset pv value sets a persistent value pv to valuetype 'a table val open_table : string -> 'a tableval find : 'a table -> string -> 'a Lwt.tfind table key gives the value associated to key. Raises Not_found if not found.val add : 'a table -> string -> 'a -> unit Lwt.tadd table key value associates value to key. If the database already contains data associated with key, that data is discarded and silently replaced by the new data.val replace_if_exists : 'a table -> string -> 'a -> unit Lwt.treplace_if_exists table key value associates value to key only if key is already bound. If the database does not contain any data associated with key, raises Not_found.val remove : 'a table -> string -> unit Lwt.tremove table key removes the entry in the table if it existsval length : 'a table -> int Lwt.tval iter_step : (string -> 'a -> unit Lwt.t) -> 'a table -> unit Lwt.tval iter_table : (string -> 'a -> unit Lwt.t) -> 'a table -> unit Lwt.tval fold_step : (string -> 'a -> 'b -> 'b Lwt.t) -> 'a table -> 'b -> 'b Lwt.tval fold_table : (string -> 'a -> 'b -> 'b Lwt.t) -> 'a table -> 'b -> 'b Lwt.t