pub struct GraphTypeBody {
pub node_types: Vec<GraphTypeNodeTypeSpec>,
pub edge_types: Vec<GraphTypeEdgeTypeSpec>,
pub constraints: Vec<GraphTypeConstraintSpec>,
pub drop_constraint_names: Vec<SmallName>,
}Expand description
A fully parsed <graph type specification body> (CIP-178): the { ... } contents shared by CreateGraphTypeClause and
AlterCurrentGraphTypeClause. Parsing is grammar-only (always succeeds
once the tokens match); the CIP-178 “shall” rules (alias/label
uniqueness, reference resolution, …) are enforced separately by
relate-executor’s graph-type validator (validate_graph_type_body),
which only CREATE GRAPH TYPE invokes – ALTER CURRENT GRAPH TYPE bodies legitimately reference
element types declared by an earlier statement (e.g. ADD), which a
single-body validation pass cannot see.
Fields§
§node_types: Vec<GraphTypeNodeTypeSpec>§edge_types: Vec<GraphTypeEdgeTypeSpec>§constraints: Vec<GraphTypeConstraintSpec>§drop_constraint_names: Vec<SmallName><constraint drop specification> = CONSTRAINT <name> (bare,
no FOR ...) – only allowed in an ALTER CURRENT GRAPH TYPE DROP { ... } body. The parser reads it in any body, and every other verb
rejects a non-empty list as a parse error
(Parser::reject_bare_constraint_drops), so this is always empty for
CREATE GRAPH TYPE/SET/ADD/ALTER bodies.