package leveldb

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

Module LevelDB.SnapshotSource

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.

Sourceval 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.

Sourceval 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.

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

Return a new iterator.

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

Refer to Iterator.iter.

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