package cactus
Module type Btree.SSource
val empty_cache : unit -> cacheempty_cache () returns a fresh, empty cache.
create ?cache ?record root creates a btree storage in directory root. If no cache is specified each call to create opens a fresh instance. If record is specified then a trace is recorded in file record.
val replay : string -> ?prog:[ `None | `Single | `Multiple ] -> t -> unitreplay ?prog path t replays the operations stored in file path.
val init : root:string -> int -> read:(int -> string) -> tinit ~root n ~read performs a batch initialisation. read is an iterator-like function : read n reads the next n bindings and returns them in a single string chunk which is the concatenation of each key ^ value. init is (much) faster than adding each bindings one by one. It assumes that the bindings are sorted.
val reconstruct : string -> treconstruct root is like create root but assumes that the b.tree file in directory root is corrupted (nodes are possibly corrupted but the leaves are not impacted) and repairs it first.
val clear : t -> unitval close : t -> unitval flush : t -> unitval length : t -> intlength t is the number of bindings in t
val pp : t Fmt.tval snapshot : ?depth:int -> t -> unitFor every node/leaf in t which are at least depth away from the leaves, snapshot ~depth t, write in a file its rep as given by their corresponding pp function.
module Private : sig ... end