Module Trakeva.Action (.ml)

module Action: sig .. end

type t = 
| Set of Trakeva.Key_in_collection.t * string
| Unset of Trakeva.Key_in_collection.t
| Sequence of t list
| Check of Trakeva.Key_in_collection.t * string option (*
An action is a transaction that (attempts) to modify the database.
*)
val set : ?collection:string -> key:string -> string -> t
Create a “set” action: set ~key v will add or set the value v for the key key, optionally in the collection collection.
val seq : t list -> t
Put a sequence of actions into a transaction.
val contains : ?collection:string -> key:string -> string -> t
An action that checks that the key is set in the DB and has the given value.
val is_not_set : ?collection:string -> string -> t
An action that checks that the key is not set in the DB.
val unset : ?collection:string -> string -> t
An actions that removes a value from the DB.
val to_string : t -> string
Convert the action to a display friendly string (the implementation is quite naive and not tail-recursive, hence avoid displaying huge transaction).