Skip to main content

MatchClause

Struct MatchClause 

Source
pub struct MatchClause {
    pub optional: bool,
    pub match_mode: MatchMode,
    pub pattern: Vec<PatternPath>,
    pub using_scan: Vec<ScanHint>,
    pub using_index: Vec<IndexHint>,
    pub using_join: Vec<JoinHint>,
    pub where_expr: Option<Expr>,
    pub search: Option<SearchClause>,
}
Expand description

MATCH clause.

Fields§

§optional: bool§match_mode: MatchMode

CIP-51/CIP-60 match mode: whether relationship uniqueness (the default DIFFERENT RELATIONSHIPS) is enforced across the whole comma-separated graph pattern, or relaxed (REPEATABLE ELEMENTS).

§pattern: Vec<PatternPath>§using_scan: Vec<ScanHint>

CIP-79 variables named by a USING SCAN <var>:<Label> hint. Relate’s planner is not cost-based, but a scan hint is not a mere plan preference here: an indexed equality seek and a label scan genuinely answer differently for a zoned-datetime DST overlap (the index keys on instant plus zone, = on the wall clock), so the hint must reach the executor — the one hint family that does; USING INDEX stops at the front-end fulfillability check and USING JOIN ON at the plan-time notification, per the two fields below.

§using_index: Vec<IndexHint>

CIP-79 USING INDEX [SEEK] <var>:<Label>(<prop>[, …]) hints. The planner is not cost-based so they steer nothing, but the front end still validates that each hint is fulfillable — Neo4j rejects an undefined hint variable and an unfulfillable hint at compile time (SemanticErrorPart2 “An index hint … is rejected”), which needs the hint preserved here.

§using_join: Vec<JoinHint>

CIP-79 USING JOIN ON <var>[, <var>…] hints. The planner is not cost-based so a join hint steers nothing — every one is unfulfillable, which the 01N30 plan-time notification reports (ADR-0363); retaining the hint here is what lets the IR carry it to that detector.

§where_expr: Option<Expr>§search: Option<SearchClause>

CIP-224 <search clause>: SEARCH <binding var ref> IN (VECTOR INDEX <index name> FOR <expr> LIMIT <expr>) [SCORE AS <var>], a subclause of <match statement>. The grammar allows the <graph pattern where clause> to appear either before or after the search clause with no semantic difference (CIP-224 “Canonical syntax”), so the parser folds both orderings into this same where_expr field – the source order isn’t tracked in the AST.

Trait Implementations§

Source§

impl Clone for MatchClause

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 MatchClause

Source§

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

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

impl PartialEq for MatchClause

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 MatchClause

Auto Trait Implementations§

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.