Skip to main content

NodePattern

Struct NodePattern 

Source
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: bool

USING 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

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn label_names(&self) -> impl Iterator<Item = &SmallName>

The label names, without their tokens.

Source

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.

Trait Implementations§

Source§

impl Clone for NodePattern

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodePattern

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for NodePattern

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NodePattern

Auto Trait Implementations§

§

impl Forget for NodePattern

§

impl Freeze for NodePattern
where *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const u8 is !null: Freeze, PhantomData<(SmallName, Token)>: Freeze, *const Expr is !null: Freeze, PhantomData<Expr>: Freeze, *const LabelExpr is !null: Freeze, PhantomData<LabelExpr>: Freeze, *const ArcInner<Vec<Value>> is !null: Freeze, PhantomData<ArcInner<Vec<Value>>>: Freeze, *const ArcInner<BTreeMap<String, Value>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<String, Value>>>: Freeze, *const ArcInner<Node> is !null: Freeze, PhantomData<ArcInner<Node>>: Freeze, *const ArcInner<Relationship> is !null: Freeze, PhantomData<ArcInner<Relationship>>: Freeze, *const ArcInner<Path> is !null: Freeze, PhantomData<ArcInner<Path>>: Freeze, NonZero<i32>: Freeze, PhantomData<u8>: Freeze, *const CivilZonedFields is !null: Freeze, PhantomData<CivilZonedFields>: Freeze, *const ArcInner<[f32]> is !null: Freeze, PhantomData<ArcInner<[f32]>>: Freeze, *const ArcInner<[f64]> is !null: Freeze, PhantomData<ArcInner<[f64]>>: Freeze, *const ArcInner<[i64]> is !null: Freeze, PhantomData<ArcInner<[i64]>>: Freeze, *const ArcInner<[u8]> is !null: Freeze, PhantomData<ArcInner<[u8]>>: Freeze, PhantomData<(String, Expr)>: Freeze, PhantomData<(Expr, Expr)>: Freeze, *const TypeExpr is !null: Freeze, PhantomData<TypeExpr>: Freeze, PhantomData<MapProjectionItem>: Freeze, PhantomData<PatternElement>: Freeze, PhantomData<NodePattern>: Freeze, PhantomData<RelPattern>: Freeze, PhantomData<SingleQuery>: Freeze, PhantomData<bool>: Freeze, *const Query is !null: Freeze, PhantomData<Query>: Freeze,

§

impl Move for NodePattern

§

impl RefUnwindSafe for NodePattern

§

impl Send for NodePattern
where Arc<str>: Send, RawVecInner: Send, BoxRaw<Expr>: Send, BoxRaw<LabelExpr>: Send, Arc<Vec<Value>>: Send, Arc<BTreeMap<String, Value>>: Send, Arc<Node>: Send, Arc<Relationship>: Send, Arc<Path>: Send, NonZero<i32>: Send, BoxRaw<CivilZonedFields>: Send, Arc<[f32]>: Send, Arc<[f64]>: Send, Arc<[i64]>: Send, Arc<[u8]>: Send, BoxRaw<TypeExpr>: Send, BoxRaw<Clause>: Send, BoxRaw<SearchClause>: Send, BoxRaw<Query>: Send,

§

impl Sync for NodePattern
where Arc<str>: Sync, RawVecInner: Sync, BoxRaw<Expr>: Sync, BoxRaw<LabelExpr>: Sync, Arc<Vec<Value>>: Sync, Arc<BTreeMap<String, Value>>: Sync, Arc<Node>: Sync, Arc<Relationship>: Sync, Arc<Path>: Sync, NonZero<i32>: Sync, BoxRaw<CivilZonedFields>: Sync, Arc<[f32]>: Sync, Arc<[f64]>: Sync, Arc<[i64]>: Sync, Arc<[u8]>: Sync, BoxRaw<TypeExpr>: Sync, BoxRaw<Clause>: Sync, BoxRaw<SearchClause>: Sync, BoxRaw<Query>: Sync,

§

impl Unpin for NodePattern

§

impl UnsafeUnpin for NodePattern
where *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<(SmallName, Token)>: UnsafeUnpin, *const Expr is !null: UnsafeUnpin, PhantomData<Expr>: UnsafeUnpin, *const LabelExpr is !null: UnsafeUnpin, PhantomData<LabelExpr>: UnsafeUnpin, *const ArcInner<Vec<Value>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<Value>>>: UnsafeUnpin, *const ArcInner<BTreeMap<String, Value>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<String, Value>>>: UnsafeUnpin, *const ArcInner<Node> is !null: UnsafeUnpin, PhantomData<ArcInner<Node>>: UnsafeUnpin, *const ArcInner<Relationship> is !null: UnsafeUnpin, PhantomData<ArcInner<Relationship>>: UnsafeUnpin, *const ArcInner<Path> is !null: UnsafeUnpin, PhantomData<ArcInner<Path>>: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const CivilZonedFields is !null: UnsafeUnpin, PhantomData<CivilZonedFields>: UnsafeUnpin, *const ArcInner<[f32]> is !null: UnsafeUnpin, PhantomData<ArcInner<[f32]>>: UnsafeUnpin, *const ArcInner<[f64]> is !null: UnsafeUnpin, PhantomData<ArcInner<[f64]>>: UnsafeUnpin, *const ArcInner<[i64]> is !null: UnsafeUnpin, PhantomData<ArcInner<[i64]>>: UnsafeUnpin, *const ArcInner<[u8]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u8]>>: UnsafeUnpin, PhantomData<(String, Expr)>: UnsafeUnpin, PhantomData<(Expr, Expr)>: UnsafeUnpin, *const TypeExpr is !null: UnsafeUnpin, PhantomData<TypeExpr>: UnsafeUnpin, PhantomData<MapProjectionItem>: UnsafeUnpin, PhantomData<PatternElement>: UnsafeUnpin, PhantomData<NodePattern>: UnsafeUnpin, PhantomData<RelPattern>: UnsafeUnpin, PhantomData<SingleQuery>: UnsafeUnpin, PhantomData<bool>: UnsafeUnpin, *const Query is !null: UnsafeUnpin, PhantomData<Query>: UnsafeUnpin,

§

impl UnwindSafe for NodePattern

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.