package leveldb

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Access to database snapshots. * Note that the functions that accept a key will copy its contents to the * stack, so exceedingly large keys could cause a stack overflow.

val make : db -> snapshot

Create a new snapshot. Note that the snapshot keeps a reference to the * DB, so the latter will not be GCed automatically as long as the snapshot * is being used. Note also that if the DB is closed manually, the snapshot * will be released and further operations will fail. The returned * snapshot needs not be released manually, for it will be released in its * finalizer.

val release : snapshot -> unit

Release the finalizer. Further operations on it will fail. Note that * the snapshot fill be released automatically in its finalizer if this * function is not called manually.

val get : snapshot -> string -> string option
val get_exn : snapshot -> string -> string
val mem : snapshot -> string -> bool
val iterator : snapshot -> iterator

Return a new iterator.

val read_access : snapshot -> read_access
val iter : (string -> string -> bool) -> snapshot -> unit

Refer to Iterator.iter.

val rev_iter : (string -> string -> bool) -> snapshot -> unit
val iter_from : (string -> string -> bool) -> snapshot -> string -> unit
val rev_iter_from : (string -> string -> bool) -> snapshot -> string -> unit