package ezjs_idb

  1. Overview
  2. Docs

Parameters

module K : Tr_sig
module D : Tr_sig

Signature

type keys =
  1. | K of K.t
  2. | KR of K.js Types.iDBKeyRange Ezjs_min.t
val create : ?options:db_options -> Types.iDBDatabase Ezjs_min.t -> string -> store
val store : ?mode:mode -> Types.iDBDatabase Ezjs_min.t -> string -> store
val add : ?callback:(K.t -> unit) -> ?error:(K.js Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:K.t -> store -> D.t -> unit
val put : ?callback:(D.js -> unit) -> ?error:(D.js Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:K.t -> store -> D.t -> unit
val range : ?olower:bool -> ?oupper:bool -> ?lower:K.t -> ?upper:K.t -> unit -> keys
val count : ?error:(int Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> store -> (int -> unit) -> unit
val get : ?error:(D.js Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (D.t option -> unit) -> keys -> unit
val get_all : ?error: (D.js Ezjs_min.js_array Ezjs_min.t Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?count:int -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (D.t list -> unit) -> unit
val get_key : ?error:(K.js Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> (K.js, 'a) Types.iDBObjectStore Ezjs_min.t -> (K.t option -> unit) -> keys -> unit
val get_all_keys : ?error: (K.js Ezjs_min.js_array Ezjs_min.t Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?count:int -> (K.js, 'a) Types.iDBObjectStore Ezjs_min.t -> (K.t list -> unit) -> unit
val delete : ?callback:(unit Ezjs_min.aopt -> unit) -> ?error:(unit Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> (K.js, 'a) Types.iDBObjectStore Ezjs_min.t -> keys -> unit
val iter : ?error: ((K.js, D.js) Types.iDBCursorWithValue Ezjs_min.t Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?direction:direction -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (K.t -> D.t -> unit) -> unit
val fold : ?error: ((K.js, D.js) Types.iDBCursorWithValue Ezjs_min.t Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?direction:direction -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (K.t -> D.t -> 'a -> 'a) -> 'a0 -> ('a1 -> unit) -> unit
val iter_keys : ?error: ((K.js, K.js) Types.iDBCursor Ezjs_min.t Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?direction:direction -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (K.t -> unit) -> unit
val fold_keys : ?error: ((K.js, K.js) Types.iDBCursor Ezjs_min.t Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?key:keys -> ?direction:direction -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> (K.t -> 'a -> 'a) -> 'a0 -> ('a1 -> unit) -> unit
val clear : ?error:(unit Ezjs_min.aopt Types.iDBRequest Js_of_ocaml.Js.t -> unit) -> ?callback:(unit -> unit) -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> unit
val create_index : ?options:index_options -> (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> string -> string -> (K.js, D.js) Types.iDBIndex Ezjs_min.t
val delete_index : (K.js, D.js) Types.iDBObjectStore Ezjs_min.t -> string -> unit