pub struct RelPattern {
pub variable: Option<SmallName>,
pub type_expr: Option<LabelExpr>,
pub properties: Vec<(SmallName, Expr)>,
pub has_properties: bool,
pub properties_param: Option<Expr>,
pub direction: Direction,
pub min_hops: Option<u32>,
pub max_hops: Option<u32>,
pub where_expr: Option<Expr>,
pub quantified: bool,
}Expand description
A relationship pattern like -[r:TYPE {prop: value}]->.
Fields§
§variable: Option<SmallName>§type_expr: Option<LabelExpr>§properties: Vec<(SmallName, Expr)>§has_properties: boolWhether a property specification was written, in either spelling.
The rel twin of NodePattern’s field: set for {} too, so
-[] {}]- and (a {}) agree wherever “has predicates” is asked
(42N56) — live-verified against Neo4j.
properties_param: Option<Expr>The $paramName whole-property-map shorthand – see
NodePattern::properties_param.
direction: Direction§min_hops: Option<u32>§max_hops: Option<u32>§where_expr: Option<Expr>The element-pattern WHERE of [r WHERE <expr>].
quantified: boolTrue when min_hops/max_hops came from a CIP-28 postfix quantifier
(-[r]->*, -->+, -[]->{1,6}, Form 5) rather than the legacy
bracket-internal [r*min..max] syntax. Distinguishes the two so the
engine can apply where_expr per traversed edge for the CIP-28 form
without changing the legacy matcher’s (TCK-tested) behavior.
Implementations§
Source§impl RelPattern
impl RelPattern
Sourcepub fn is_variable_length(&self) -> bool
pub fn is_variable_length(&self) -> bool
Whether the relationship is variable-length: either hop bound was
written (*m..n, or a CIP-28 quantifier lowered onto the bounds).
The one predicate every consumer consults instead of re-spelling
the two is_some checks.