Skip to main content

AstNode

Enum AstNode 

Source
pub enum AstNode {
Show 78 variants Context, Nodes { reference: NodeRef, }, NodesWhere { predicate: Predicate, }, Edges { reference: EdgeRef, }, EdgesWhere { predicate: Predicate, }, VectorSearchNodes { label: String, property: String, tenant_value: Option<PropertyInput>, query_vector: PropertyInput, k: StreamBound, }, TextSearchNodes { label: String, property: String, tenant_value: Option<PropertyInput>, query_text: PropertyInput, k: StreamBound, }, VectorSearchEdges { label: String, property: String, tenant_value: Option<PropertyInput>, query_vector: PropertyInput, k: StreamBound, }, TextSearchEdges { label: String, property: String, tenant_value: Option<PropertyInput>, query_text: PropertyInput, k: StreamBound, }, VectorSearchNodesWithin { input: Box<AstNode>, label: String, property: String, tenant_value: Option<PropertyInput>, query_vector: PropertyInput, k: StreamBound, }, VectorSearchEdgesWithin { input: Box<AstNode>, label: String, property: String, tenant_value: Option<PropertyInput>, query_vector: PropertyInput, k: StreamBound, }, Out { input: Box<AstNode>, label: Option<String>, }, In { input: Box<AstNode>, label: Option<String>, }, Both { input: Box<AstNode>, label: Option<String>, }, OutE { input: Box<AstNode>, label: Option<String>, }, InE { input: Box<AstNode>, label: Option<String>, }, BothE { input: Box<AstNode>, label: Option<String>, }, OutN { input: Box<AstNode>, }, InN { input: Box<AstNode>, }, OtherN { input: Box<AstNode>, }, Has { input: Box<AstNode>, property: String, value: PropertyValue, }, HasLabel { input: Box<AstNode>, label: String, }, HasKey { input: Box<AstNode>, property: String, }, Where { input: Box<AstNode>, predicate: Predicate, }, Dedup { input: Box<AstNode>, }, Within { input: Box<AstNode>, variable: String, }, Without { input: Box<AstNode>, variable: String, }, EdgeHas { input: Box<AstNode>, property: String, value: PropertyInput, }, EdgeHasLabel { input: Box<AstNode>, label: String, }, Limit { input: Box<AstNode>, count: StreamBound, }, Skip { input: Box<AstNode>, count: StreamBound, }, Range { input: Box<AstNode>, start: StreamBound, end: StreamBound, }, As { input: Box<AstNode>, name: String, }, Store { input: Box<AstNode>, name: String, }, Select { input: Box<AstNode>, name: String, }, Bind { input: Box<AstNode>, name: String, }, Inject { input: Option<Box<AstNode>>, variable: String, }, Count { input: Box<AstNode>, }, Exists { input: Box<AstNode>, }, Id { input: Box<AstNode>, }, Label { input: Box<AstNode>, }, Values { input: Box<AstNode>, properties: Vec<String>, }, ValueMap { input: Box<AstNode>, properties: Option<Vec<String>>, }, Project { input: Box<AstNode>, projections: Vec<Projection>, }, ProjectBindings { input: Box<AstNode>, projections: Vec<BindingProjection>, distinct: bool, }, EdgeProperties { input: Box<AstNode>, }, CreateIndex { spec: IndexSpec, if_not_exists: bool, }, DropIndex { spec: IndexSpec, }, GetIndexOperation { operation_id: String, }, RetryIndexOperation { operation_id: String, }, AbortIndexOperation { operation_id: String, }, AddN { input: Option<Box<AstNode>>, label: String, properties: Vec<(String, PropertyInput)>, }, AddE { input: Box<AstNode>, label: String, to: NodeRef, properties: Vec<(String, PropertyInput)>, }, SetProperty { input: Box<AstNode>, name: String, value: PropertyInput, }, RemoveProperty { input: Box<AstNode>, name: String, }, Drop { input: Box<AstNode>, }, DropEdge { input: Box<AstNode>, to: NodeRef, }, DropEdgeLabeled { input: Box<AstNode>, to: NodeRef, label: String, }, DropEdgeById { input: Option<Box<AstNode>>, edges: EdgeRef, }, OrderBy { input: Box<AstNode>, property: String, order: Order, }, OrderByMultiple { input: Box<AstNode>, orderings: Vec<(String, Order)>, }, Repeat { input: Box<AstNode>, config: RepeatConfig, }, Union { input: Box<AstNode>, traversals: Vec<SubTraversal>, }, Choose { input: Box<AstNode>, condition: Predicate, then_traversal: SubTraversal, else_traversal: Option<SubTraversal>, }, Coalesce { input: Box<AstNode>, traversals: Vec<SubTraversal>, }, Optional { input: Box<AstNode>, traversal: SubTraversal, }, Group { input: Box<AstNode>, property: String, }, GroupCount { input: Box<AstNode>, property: String, }, AggregateBy { input: Box<AstNode>, function: AggregateFunction, property: String, }, Fold { input: Box<AstNode>, }, Unfold { input: Box<AstNode>, }, Path { input: Box<AstNode>, }, SimplePath { input: Box<AstNode>, }, WithSack { input: Box<AstNode>, initial: PropertyValue, }, SackSet { input: Box<AstNode>, property: String, }, SackAdd { input: Box<AstNode>, property: String, }, SackGet { input: Box<AstNode>, }, ShortestPath { source: NodeRef, target: NodeRef, label: Option<String>, direction: ShortestPathDirection, max_depth: usize, },
}
Expand description

Query AST node.

Variants§

§

Context

Implicit branch input for sub-traversals.

§

Nodes

Start from nodes.

Fields

§reference: NodeRef
§

NodesWhere

Start from nodes matching a predicate.

Fields

§predicate: Predicate
§

Edges

Start from edges.

Fields

§reference: EdgeRef
§

EdgesWhere

Start from edges matching a predicate.

Fields

§predicate: Predicate
§

VectorSearchNodes

Vector search on nodes.

Fields

§label: String

Label scope.

§property: String

Vector property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_vector: PropertyInput

Query vector input.

§k: StreamBound

Result count.

§

TextSearchNodes

Text search on nodes.

Fields

§label: String

Label scope.

§property: String

Text property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_text: PropertyInput

Query text input.

§k: StreamBound

Result count.

§

VectorSearchEdges

Vector search on edges.

Fields

§label: String

Label scope.

§property: String

Vector property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_vector: PropertyInput

Query vector input.

§k: StreamBound

Result count.

§

TextSearchEdges

Text search on edges.

Fields

§label: String

Label scope.

§property: String

Text property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_text: PropertyInput

Query text input.

§k: StreamBound

Result count.

§

VectorSearchNodesWithin

Rank the current node stream by one vector index.

Fields

§input: Box<AstNode>

Input node stream whose IDs are the exact candidate filter.

§label: String

Label scope.

§property: String

Vector property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_vector: PropertyInput

Query vector input.

§k: StreamBound

Result count.

§

VectorSearchEdgesWithin

Rank the current edge stream by one vector index.

Fields

§input: Box<AstNode>

Input edge stream whose IDs are the exact candidate filter.

§label: String

Label scope.

§property: String

Vector property.

§tenant_value: Option<PropertyInput>

Optional tenant value.

§query_vector: PropertyInput

Query vector input.

§k: StreamBound

Result count.

§

Out

Node-to-node outgoing traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

In

Node-to-node incoming traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

Both

Node-to-node both-direction traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

OutE

Node-to-edge outgoing traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

InE

Node-to-edge incoming traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

BothE

Node-to-edge both-direction traversal.

Fields

§input: Box<AstNode>

Input stream.

§label: Option<String>

Optional edge label.

§

OutN

Edge-to-target-node traversal.

Fields

§input: Box<AstNode>
§

InN

Edge-to-source-node traversal.

Fields

§input: Box<AstNode>
§

OtherN

Edge-to-other-node traversal.

Fields

§input: Box<AstNode>
§

Has

Property equality filter.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property name.

§value: PropertyValue

Literal value.

§

HasLabel

Label filter.

Fields

§input: Box<AstNode>

Input stream.

§label: String

Label.

§

HasKey

Property existence filter.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§

Where

Predicate filter.

Fields

§input: Box<AstNode>

Input stream.

§predicate: Predicate

Predicate.

§

Dedup

Deduplicate stream.

Fields

§input: Box<AstNode>
§

Within

Keep elements within a variable.

Fields

§input: Box<AstNode>

Input stream.

§variable: String

Variable name.

§

Without

Keep elements outside a variable.

Fields

§input: Box<AstNode>

Input stream.

§variable: String

Variable name.

§

EdgeHas

Edge property filter.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§value: PropertyInput

Value or expression.

§

EdgeHasLabel

Edge label filter.

Fields

§input: Box<AstNode>

Input stream.

§label: String

Label.

§

Limit

Limit.

Fields

§input: Box<AstNode>

Input stream.

§count: StreamBound

Bound.

§

Skip

Skip.

Fields

§input: Box<AstNode>

Input stream.

§count: StreamBound

Bound.

§

Range

Range.

Fields

§input: Box<AstNode>

Input stream.

§start: StreamBound

Start bound.

§end: StreamBound

End bound.

§

As

Store current stream.

Fields

§input: Box<AstNode>
§name: String
§

Store

Store current stream.

Fields

§input: Box<AstNode>
§name: String
§

Select

Select named stream.

Fields

§input: Box<AstNode>
§name: String
§

Bind

Capture current element as row binding.

Fields

§input: Box<AstNode>
§name: String
§

Inject

Inject variable stream.

Fields

§input: Option<Box<AstNode>>

Optional input stream. None means source inject.

§variable: String

Variable name.

§

Count

Count terminal.

Fields

§input: Box<AstNode>
§

Exists

Exists terminal.

Fields

§input: Box<AstNode>
§

Id

ID terminal.

Fields

§input: Box<AstNode>
§

Label

Label terminal.

Fields

§input: Box<AstNode>
§

Values

Values terminal.

Fields

§input: Box<AstNode>

Input stream.

§properties: Vec<String>

Properties.

§

ValueMap

Value-map terminal.

Fields

§input: Box<AstNode>

Input stream.

§properties: Option<Vec<String>>

Optional property filter.

§

Project

Project terminal.

Fields

§input: Box<AstNode>

Input stream.

§projections: Vec<Projection>

Projection list.

§

ProjectBindings

Row-binding projection terminal.

Fields

§input: Box<AstNode>

Input stream.

§projections: Vec<BindingProjection>

Projection list.

§distinct: bool

Deduplicate projected rows.

§

EdgeProperties

Edge properties terminal.

Fields

§input: Box<AstNode>
§

CreateIndex

Create index.

Fields

§spec: IndexSpec

Index specification.

§if_not_exists: bool

Ignore existing matching index.

§

DropIndex

Drop index.

Fields

§spec: IndexSpec

Index specification.

§

GetIndexOperation

Read one retained index operation in the request scope.

Fields

§operation_id: String

Canonical lowercase operation UUID.

§

RetryIndexOperation

Ensure one retained operation is runnable in the request scope.

Fields

§operation_id: String

Canonical lowercase operation UUID.

§

AbortIndexOperation

Convert one constructing BUILD into abort cleanup.

Fields

§operation_id: String

Canonical lowercase operation UUID.

§

AddN

Add node.

Fields

§input: Option<Box<AstNode>>

Optional prior input.

§label: String

Node label.

§properties: Vec<(String, PropertyInput)>

Properties.

§

AddE

Add edge.

Fields

§input: Box<AstNode>

Input node stream.

§label: String

Edge label.

§to: NodeRef

Target nodes.

§properties: Vec<(String, PropertyInput)>

Properties.

§

SetProperty

Set property.

Fields

§input: Box<AstNode>

Input stream.

§name: String

Property name.

§value: PropertyInput

Value.

§

RemoveProperty

Remove property.

Fields

§input: Box<AstNode>

Input stream.

§name: String

Property name.

§

Drop

Drop nodes.

Fields

§input: Box<AstNode>
§

DropEdge

Drop edges between current nodes and targets.

Fields

§input: Box<AstNode>

Input node stream.

§to: NodeRef

Target nodes.

§

DropEdgeLabeled

Drop labeled edges.

Fields

§input: Box<AstNode>

Input node stream.

§to: NodeRef

Target nodes.

§label: String

Edge label.

§

DropEdgeById

Drop edges by ID.

Fields

§input: Option<Box<AstNode>>

Optional input stream.

§edges: EdgeRef

Edge references.

§

OrderBy

Order by one property.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§order: Order

Order.

§

OrderByMultiple

Order by multiple properties.

Fields

§input: Box<AstNode>

Input stream.

§orderings: Vec<(String, Order)>

Ordered keys.

§

Repeat

Repeat traversal.

Fields

§input: Box<AstNode>

Input stream.

§config: RepeatConfig

Repeat configuration.

§

Union

Union branch traversals.

Fields

§input: Box<AstNode>

Input stream.

§traversals: Vec<SubTraversal>

Branch traversals.

§

Choose

Conditional branch.

Fields

§input: Box<AstNode>

Input stream.

§condition: Predicate

Condition.

§then_traversal: SubTraversal

Then branch.

§else_traversal: Option<SubTraversal>

Else branch.

§

Coalesce

Coalesce branches.

Fields

§input: Box<AstNode>

Input stream.

§traversals: Vec<SubTraversal>

Branch traversals.

§

Optional

Optional branch.

Fields

§input: Box<AstNode>

Input stream.

§traversal: SubTraversal

Branch traversal.

§

Group

Group terminal.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§

GroupCount

Group-count terminal.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§

AggregateBy

Aggregate terminal.

Fields

§input: Box<AstNode>

Input stream.

§function: AggregateFunction

Function.

§property: String

Property.

§

Fold

Fold barrier.

Fields

§input: Box<AstNode>
§

Unfold

Unfold barrier.

Fields

§input: Box<AstNode>
§

Path

Path operation.

Fields

§input: Box<AstNode>
§

SimplePath

Simple-path operation.

Fields

§input: Box<AstNode>
§

WithSack

Sack initialization.

Fields

§input: Box<AstNode>

Input stream.

§initial: PropertyValue

Initial value.

§

SackSet

Sack set.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§

SackAdd

Sack add.

Fields

§input: Box<AstNode>

Input stream.

§property: String

Property.

§

SackGet

Sack get.

Fields

§input: Box<AstNode>
§

ShortestPath

Unweighted shortest path between two nodes.

Fields

§source: NodeRef

Source node reference. Must resolve to exactly one node at runtime.

§target: NodeRef

Target node reference. Must resolve to exactly one node at runtime.

§label: Option<String>

Optional edge label.

§direction: ShortestPathDirection

Traversal direction.

§max_depth: usize

Maximum traversal depth.

Implementations§

Source§

impl AstNode

Source

pub fn is_read_only(&self) -> bool

Returns true when this AST cannot mutate persistent graph or index state.

The match is intentionally exhaustive so adding an AST operation requires an explicit read-safety decision before the crate compiles.

Source

pub fn is_terminal(&self) -> bool

Returns true when this node is terminal.

Trait Implementations§

Source§

impl Clone for AstNode

Source§

fn clone(&self) -> AstNode

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 AstNode

Source§

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

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

impl<'de> Deserialize<'de> for AstNode

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<AstNode, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AstNode

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for AstNode

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AstNode

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more