package trakeva

  1. Overview
  2. Docs
type t =
  1. | Set of Key_in_collection.t * string
  2. | Unset of Key_in_collection.t
  3. | Sequence of t list
  4. | Check of 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).

OCaml

Innovation. Community. Security.