pub struct NodePattern {
pub variable: Option<SmallName>,
pub labels: Vec<NamedToken>,
pub label_expr: Option<LabelExpr>,
pub properties: Option<Expr>,
pub prop_keys: Vec<NamedToken>,
pub where_clause: Option<Expr>,
pub force_scan: bool,
}Fields§
§variable: Option<SmallName>§labels: Vec<NamedToken>Static conjunction, retained for catalog/index candidate selection,
each name beside its token (Unresolved until planning resolves the
pattern against a store, ADR-0541).
An empty list is ambiguous on its own: it means both “the node
names no label” and “the label expression is not a plain
conjunction” (a disjunction, negation or wildcard keeps its shape
only in label_expr). A consumer that must tell the two apart reads
label_expr; one that only wants candidate labels reads this.
label_expr: Option<LabelExpr>Complete CIP-14/CIP-156 label expression.
properties: Option<Expr>§prop_keys: Vec<NamedToken>The literal keys of properties, each beside its token
(Unresolved until planning resolves them, ADR-0541). A key the
map does not spell literally has no entry here and reads by name.
where_clause: Option<Expr>§force_scan: boolUSING SCAN <var>:<Label>: candidate selection must take the
label scan, never an index seek. Unlike the other hints this is not
merely a plan preference — an indexed equality seek and a scan
genuinely answer differently for a zoned-datetime DST overlap (the
index keys instant plus zone, = keys the wall clock), which the
measured acceptance suite pins.
Implementations§
Source§impl NodePattern
impl NodePattern
Sourcepub fn declares_shape(&self) -> bool
pub fn declares_shape(&self) -> bool
Whether the node spells a label requirement or a property map: the
shape that makes an element variable a declaration rather than a
bare reference to an existing binding. The one predicate behind
PathPattern::node_reuses_binding.
Sourcepub fn is_unconstrained(&self) -> bool
pub fn is_unconstrained(&self) -> bool
Whether the node constrains nothing the label/property half could
check: Self::declares_shape is false and there is no inline
WHERE — the whole node population. The one predicate behind the
executor’s whole-count arm and PathPattern::whole_population_node.
Sourcepub fn has_static_labels(&self) -> bool
pub fn has_static_labels(&self) -> bool
Whether the label requirement is static: no label expression, or a
plain conjunction (so labels holds its operands, except that a
nested conjunction keeps its shape only in label_expr). The one
canonical predicate the executor’s seek, fold and shortest-path
guards read; an anonymous node (no requirement) answers true.
Sourcepub fn anonymous() -> Self
pub fn anonymous() -> Self
The implicit anonymous boundary node of a synthesized quantified
group — anonymous and unconstrained, exactly what (()-[r:T]-()){m,n}
lowers for its (). The one spelling of the shape, at the type’s
home: the front’s lowering and the executor’s NFA compile and GPM
anonymous start both build it.
Sourcepub fn label_names(&self) -> impl Iterator<Item = &SmallName>
pub fn label_names(&self) -> impl Iterator<Item = &SmallName>
The label names, without their tokens.
Sourcepub fn static_disjunction_arms(&self) -> Option<DisjunctionArms<'_>>
pub fn static_disjunction_arms(&self) -> Option<DisjunctionArms<'_>>
The disjunction arms of the pattern’s label expression (LABS-1083)
— the one accessor every consumer of the folded shape reads (the
executor’s union serve, the plan narration, the warning’s scan
shape), so the derivation is spelled once at the type’s home.
None for every other shape: no label expression, a plain
conjunction, or a shape the classifier declines.