package plebeia

  1. Overview
  2. Docs

3 High level

val deep : go_up:bool -> create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor -> Segment.t -> (Plebeia__.Cursor.cursor * 'a, Error.t) Result.t) -> (Plebeia__.Cursor.cursor * 'a, Error.t) Result.t

Multi Bud level interface. deep performs f against the node pointed by the multi segments.

val get : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor * [ `Bud of Plebeia__.Node.view | `Leaf of Plebeia__.Node.view ], Error.t) Result.t
val get_value : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor * Value.t, Error.t) Result.t
val insert : Plebeia__.Cursor.cursor -> Segment.t list -> Value.t -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val upsert : Plebeia__.Cursor.cursor -> Segment.t list -> Value.t -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val update : Plebeia__.Cursor.cursor -> Segment.t list -> Value.t -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val delete : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t

If the target does not exists, do nothing

val delete_and_clean_empty : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t

If the target does not exists, do nothing. If the result of the removal generates an empty bud, delete_and_clean_empty also cleans it.

The result cursor points to the bud which has the top most removed element.

val create_subtree : create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val subtree : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val subtree_or_create : create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
val copy : create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t

Subtree copy by making two nodes point to the same subtree.

Copy attempts which introduce loops are rejected.

link n c segs makes a link to n at c/segs.

link is like copy, but n needs not to be a part of the tree of c.

n and c must be of the same context. In addition, they must base on the same commit. Otherwise link can break the invariant of index ordering between commits used by the fast multi-commit node traversal Traverse.

There is no prevention of cycle creation.

OCaml

Innovation. Community. Security.