package zarr

  1. Overview
  2. Docs

The abstract store interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a "/". In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. (i.e. a store is a mapping from keys to values). It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> Types.key -> int Deferred.t
val get_partial_values : t -> string -> Types.range list -> Types.value list Deferred.t
val set : t -> Types.key -> Types.value -> unit Deferred.t
val set_partial_values : t -> Types.key -> ?append:bool -> (Types.range_start * Types.value) list -> unit Deferred.t
val erase : t -> Types.key -> unit Deferred.t
val erase_prefix : t -> Types.key -> unit Deferred.t
val list : t -> Types.key list Deferred.t
val list_dir : t -> Types.key -> (Types.key list * Types.prefix list) Deferred.t
val is_member : t -> Types.key -> bool Deferred.t
OCaml

Innovation. Community. Security.