Module STORE.Group

val create : ?attrs:Yojson.Safe.t -> t -> Node.Group.t -> unit Deferred.t

create ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

metadata node t returns the metadata of group node node.

val children : t -> Node.Group.t -> (Node.Array.t list * Node.Group.t list) Deferred.t

children t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

  • raises Parse_error

    if any child node has invalid node_type metadata.

val delete : t -> Node.Group.t -> unit Deferred.t

delete t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val exists : t -> Node.Group.t -> bool Deferred.t

exists t n returns true if group node n is a member of store t and false otherwise.

val rename : t -> Node.Group.t -> string -> unit Deferred.t

rename t g name changes the name of group node g in store t to name.

  • raises Renaming_root

    if g is the store's root node.

  • raises Node_invariant

    if name is an invalid node name.