Skip to main content

RelPattern

Struct RelPattern 

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

The type list was written with the deprecated |: separator ([:R|:T]): the one fact the deprecation notification reads.

Implementations§

Source§

impl RelPattern

Source

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

The type names, without their tokens.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for RelPattern

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 RelPattern

Source§

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

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

impl PartialEq for RelPattern

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 RelPattern

Auto Trait Implementations§

§

impl Forget for RelPattern

§

impl Freeze for RelPattern
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 RelPattern

§

impl RefUnwindSafe for RelPattern

§

impl Send for RelPattern
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 RelPattern
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 RelPattern

§

impl UnsafeUnpin for RelPattern
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 RelPattern

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.