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.
NodesWhere
Start from nodes matching a predicate.
Edges
Start from edges.
EdgesWhere
Start from edges matching a predicate.
VectorSearchNodes
Vector search on nodes.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_vector: PropertyInputQuery vector input.
k: StreamBoundResult count.
TextSearchNodes
Text search on nodes.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_text: PropertyInputQuery text input.
k: StreamBoundResult count.
VectorSearchEdges
Vector search on edges.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_vector: PropertyInputQuery vector input.
k: StreamBoundResult count.
TextSearchEdges
Text search on edges.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_text: PropertyInputQuery text input.
k: StreamBoundResult count.
VectorSearchNodesWithin
Rank the current node stream by one vector index.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_vector: PropertyInputQuery vector input.
k: StreamBoundResult count.
VectorSearchEdgesWithin
Rank the current edge stream by one vector index.
Fields
tenant_value: Option<PropertyInput>Optional tenant value.
query_vector: PropertyInputQuery vector input.
k: StreamBoundResult count.
Out
Node-to-node outgoing traversal.
In
Node-to-node incoming traversal.
Both
Node-to-node both-direction traversal.
OutE
Node-to-edge outgoing traversal.
InE
Node-to-edge incoming traversal.
BothE
Node-to-edge both-direction traversal.
OutN
Edge-to-target-node traversal.
InN
Edge-to-source-node traversal.
OtherN
Edge-to-other-node traversal.
Has
Property equality filter.
Fields
value: PropertyValueLiteral value.
HasLabel
Label filter.
HasKey
Property existence filter.
Where
Predicate filter.
Dedup
Deduplicate stream.
Within
Keep elements within a variable.
Without
Keep elements outside a variable.
EdgeHas
Edge property filter.
Fields
value: PropertyInputValue or expression.
EdgeHasLabel
Edge label filter.
Limit
Limit.
Skip
Skip.
Range
Range.
As
Store current stream.
Store
Store current stream.
Select
Select named stream.
Bind
Capture current element as row binding.
Inject
Inject variable stream.
Fields
Count
Count terminal.
Exists
Exists terminal.
Id
ID terminal.
Label
Label terminal.
Values
Values terminal.
ValueMap
Value-map terminal.
Project
Project terminal.
ProjectBindings
Row-binding projection terminal.
Fields
projections: Vec<BindingProjection>Projection list.
EdgeProperties
Edge properties terminal.
CreateIndex
Create index.
DropIndex
Drop index.
GetIndexOperation
Read one retained index operation in the request scope.
RetryIndexOperation
Ensure one retained operation is runnable in the request scope.
AbortIndexOperation
Convert one constructing BUILD into abort cleanup.
AddN
Add node.
Fields
properties: Vec<(String, PropertyInput)>Properties.
AddE
Add edge.
Fields
properties: Vec<(String, PropertyInput)>Properties.
SetProperty
Set property.
RemoveProperty
Remove property.
Drop
Drop nodes.
DropEdge
Drop edges between current nodes and targets.
DropEdgeLabeled
Drop labeled edges.
DropEdgeById
Drop edges by ID.
OrderBy
Order by one property.
OrderByMultiple
Order by multiple properties.
Repeat
Repeat traversal.
Union
Union branch traversals.
Choose
Conditional branch.
Coalesce
Coalesce branches.
Optional
Optional branch.
Group
Group terminal.
GroupCount
Group-count terminal.
AggregateBy
Aggregate terminal.
Fields
function: AggregateFunctionFunction.
Fold
Fold barrier.
Unfold
Unfold barrier.
Path
Path operation.
SimplePath
Simple-path operation.
WithSack
Sack initialization.
SackSet
Sack set.
SackAdd
Sack add.
SackGet
Sack get.
ShortestPath
Unweighted shortest path between two nodes.
Fields
direction: ShortestPathDirectionTraversal direction.
Implementations§
Source§impl AstNode
impl AstNode
Sourcepub fn is_read_only(&self) -> bool
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.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true when this node is terminal.