package plebeia

  1. Overview
  2. Docs

Module Internal.DeepSource

3 High level

Sourceval 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.

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

If the target does not exists, do nothing

Sourceval 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.

Sourceval create_subtree : create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
Sourceval subtree : Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
Sourceval subtree_or_create : create_subtrees:bool -> Plebeia__.Cursor.cursor -> Segment.t list -> (Plebeia__.Cursor.cursor, Error.t) Result.t
Sourceval 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.