Skip to content

Commit 5c4df40

Browse files
fixä
1 parent 26208b5 commit 5c4df40

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/ROOT/pages/clauses/match.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,15 @@ RETURN path
358358

359359
For more information about how `MATCH` is used to find patterns (including xref:patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path patterns], xref:patterns/variable-length-patterns.adoc#quantified-relationships[quantified relationships], and xref:patterns/shortest-paths.adoc[shortest paths]), see the section on xref::patterns/index.adoc[Patterns].
360360

361-
== WITH and using multiple MATCH clauses
361+
== Multiple MATCH clauses, the WITH clause, and clause composition
362+
363+
In Cypher, the output of a clause creates a new state of the graph, and a new table of intermediate results which serves as the input of the next clause.
364+
The first clause takes as input the state of the graph before the query and an empty table of intermediate results.
365+
The output of the last clause is the result of the query.
366+
367+
368+
In Cypher, each clause has as input the state of the graph and a table of intermediate results
369+
Each clause has as input the state of the graph and a table of intermediate results consisting of the current variables. The output of a clause is a new state of the graph and a new table of intermediate results, serving as input to the next clause. The first clause takes as input the state of the graph before the query and an empty table of intermediate results. The output of the last clause is the result of the query.
362370

363371
MATCH (martin:Person {name: 'Martin Sheen'})-[:ACTED_IN]->(movie:Movie)
364372
WITH movie // Pass the movie variable to the next part of the query

0 commit comments

Comments
 (0)