pub struct RelPattern {
pub variable: Option<SmallName>,
pub types: Vec<NamedToken>,
pub type_expr: Option<LabelExpr>,
pub direction: Direction,
pub properties: Option<Expr>,
pub prop_keys: Vec<NamedToken>,
pub var_length: bool,
pub min_hops: u32,
pub max_hops: Option<u32>,
pub where_clause: Option<Expr>,
pub quantified: bool,
pub legacy_type_separator: bool,
}Fields§
§variable: Option<SmallName>§types: Vec<NamedToken>Static disjunction, retained for typed-CSR candidate selection, each
name beside its token (Unresolved until planning resolves the
pattern against a store, ADR-0541).
type_expr: Option<LabelExpr>Complete CIP-14/CIP-156 relationship type expression.
direction: Direction§properties: Option<Expr>§prop_keys: Vec<NamedToken>The literal keys of properties, each beside its token — see
NodePattern::prop_keys.
var_length: bool§min_hops: u32§max_hops: Option<u32>§where_clause: Option<Expr>§quantified: bool§legacy_type_separator: boolThe type list was written with the deprecated |: separator
([:R|:T]): the one fact the deprecation notification reads.
Implementations§
Source§impl RelPattern
impl RelPattern
Sourcepub fn type_names(&self) -> impl Iterator<Item = &SmallName>
pub fn type_names(&self) -> impl Iterator<Item = &SmallName>
The type names, without their tokens.
Sourcepub fn type_expr_is_static_types(&self) -> bool
pub fn type_expr_is_static_types(&self) -> bool
Whether type_expr spells exactly the static types list — a
single label, or an Or of the same labels in the same order
(LABS-801). Such an expression is fully applied by any walk that
filters on types, so per-edge admission need not re-evaluate it.
Anything else — a negated or conjunctive expression, or a list the
expression does not spell (the CREATE/MERGE rewrite sets types
from a resolved type list beside an And expression, exactly that
case) — answers false and keeps the per-edge evaluation.
Sourcepub fn types_are_complete_filter(&self) -> bool
pub fn types_are_complete_filter(&self) -> bool
Whether the types list is the complete relationship-type filter:
type_expr is absent (an untyped hop carries an empty list, which
means “every type”), or it spells exactly the non-empty static
list. An empty Or is a filter that matches nothing, not the
any-type set, so it answers false.