sig
module Key_in_collection :
sig
type t = { key : string; collection : string option; }
val create :
?collection:string -> string -> Trakeva.Key_in_collection.t
val to_string : Trakeva.Key_in_collection.t -> string
end
module Action :
sig
type t =
Set of Trakeva.Key_in_collection.t * string
| Unset of Trakeva.Key_in_collection.t
| Sequence of Trakeva.Action.t list
| Check of Trakeva.Key_in_collection.t * string option
val set :
?collection:string -> key:string -> string -> Trakeva.Action.t
val seq : Trakeva.Action.t list -> Trakeva.Action.t
val contains :
?collection:string -> key:string -> string -> Trakeva.Action.t
val is_not_set : ?collection:string -> string -> Trakeva.Action.t
val unset : ?collection:string -> string -> Trakeva.Action.t
val to_string : Trakeva.Action.t -> string
end
module Error :
sig
type t =
[ `Act of Trakeva.Action.t
| `Close
| `Get of Trakeva.Key_in_collection.t
| `Get_all of string
| `Iter of string
| `Load of string ] * string
val to_string : Trakeva.Error.t -> string
end
module type KEY_VALUE_STORE =
sig
type t
val load :
string ->
(Trakeva.KEY_VALUE_STORE.t,
[> `Database of [> `Load of string ] * string ])
Pvem_lwt_unix.Deferred_result.t
val close :
Trakeva.KEY_VALUE_STORE.t ->
(unit, [> `Database of [> `Close ] * string ])
Pvem_lwt_unix.Deferred_result.t
val get :
?collection:string ->
Trakeva.KEY_VALUE_STORE.t ->
key:string ->
(string option,
[> `Database of [> `Get of Trakeva.Key_in_collection.t ] * string ])
Pvem_lwt_unix.Deferred_result.t
val get_all :
Trakeva.KEY_VALUE_STORE.t ->
collection:string ->
(string list, [> `Database of [> `Get_all of string ] * string ])
Pvem_lwt_unix.Deferred_result.t
val iterator :
Trakeva.KEY_VALUE_STORE.t ->
collection:string ->
unit ->
(string option, [> `Database of [> `Iter of string ] * string ])
Pvem_lwt_unix.Deferred_result.t
val act :
Trakeva.KEY_VALUE_STORE.t ->
action:Trakeva.Action.t ->
([ `Done | `Not_done ],
[> `Database of [> `Act of Trakeva.Action.t ] * string ])
Pvem_lwt_unix.Deferred_result.t
end
end