package irmin-indexeddb

  1. Overview
  2. Docs

Parameters

module K : Irmin.Hash.S
module V : Tc.S0

Signature

include Irmin.AO with type key = K.t and type value = V.t

Append-only stores

include Irmin.RO with type key = K.t with type value = V.t

Read-only stores

type t

Type for stores.

type key = K.t

Type for keys.

type value = V.t

Type for values.

val read : t -> key -> value option Lwt.t

Read a value from the store.

val read_exn : t -> key -> value Lwt.t

Same as read but raise Invalid_argument if the key does not exist.

val mem : t -> key -> bool Lwt.t

Check if a key exists.

val iter : t -> (key -> value Lwt.t -> unit Lwt.t) -> unit Lwt.t

iter t fn call the function fn on all t's keys and values.

val add : t -> value -> key Lwt.t

Write the contents of a value to the store. It's the responsibility of the append-only store to generate a consistent key.

val create : Irmin.config -> t Lwt.t

create config is a function returning fresh store handles, with the configuration config, which is provided by the backend. The operation might be blocking, depending on the backend.