2017-11-14 00:32:46 +01:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 00:36:14 +01:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2017-11-14 00:32:46 +01:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2016-09-08 19:13:10 +02:00
|
|
|
(** View over the context store, restricted to types, access and
|
|
|
|
functional manipulation of an existing context. *)
|
|
|
|
|
2017-11-15 13:06:41 +01:00
|
|
|
type t
|
|
|
|
|
|
|
|
(** Keys in (kex x value) database implementations *)
|
|
|
|
type key = string list
|
|
|
|
|
|
|
|
(** Values in (kex x value) database implementations *)
|
|
|
|
type value = MBytes.t
|
|
|
|
|
|
|
|
val mem: t -> key -> bool Lwt.t
|
|
|
|
val dir_mem: t -> key -> bool Lwt.t
|
2017-11-16 16:45:22 +01:00
|
|
|
|
2017-11-15 13:06:41 +01:00
|
|
|
val get: t -> key -> value option Lwt.t
|
2017-11-16 16:45:22 +01:00
|
|
|
|
2017-11-15 13:06:41 +01:00
|
|
|
val set: t -> key -> value -> t Lwt.t
|
2017-11-16 16:45:22 +01:00
|
|
|
|
2017-11-15 13:06:41 +01:00
|
|
|
val del: t -> key -> t Lwt.t
|
|
|
|
val remove_rec: t -> key -> t Lwt.t
|
2016-09-08 19:13:10 +02:00
|
|
|
|
2017-11-15 16:20:08 +01:00
|
|
|
val fold:
|
|
|
|
t -> key -> init:'a ->
|
|
|
|
f:([ `Key of key | `Dir of key ] -> 'a -> 'a Lwt.t) ->
|
|
|
|
'a Lwt.t
|
|
|
|
|
|
|
|
val keys: t -> key -> key list Lwt.t
|
|
|
|
val fold_keys:
|
|
|
|
t -> key -> init:'a -> f:(key -> 'a -> 'a Lwt.t) -> 'a Lwt.t
|
|
|
|
|
2016-11-14 17:28:37 +01:00
|
|
|
val register_resolver:
|
2017-02-19 18:22:32 +01:00
|
|
|
'a Base58.encoding -> (t -> string -> 'a list Lwt.t) -> unit
|
2016-11-14 17:28:37 +01:00
|
|
|
|
2017-02-19 18:22:32 +01:00
|
|
|
val complete: t -> string -> string list Lwt.t
|