Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions modules/ROOT/examples/MATCH.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# MATCH clause short

<simple match statement> ::=
"MATCH" <graph pattern>

<graph pattern> ::=
[ <match mode> ] link:/cypher-manual/25/patterns/reference/#path-patterns[<path pattern>] [ { "," link:/cypher-manual/25/patterns/reference/#path-patterns[<path pattern>] }... ] [ <graph pattern where clause> ]

<match mode> ::=
"REPEATABLE" { "ELEMENT" [ "BINDINGS" ] | "ELEMENTS" }
| "DIFFERENT" { "RELATIONSHIP" [ "BINDINGS" ] | "RELATIONSHIPS" }

link:/cypher-manual/25/patterns/reference/#path-patterns[<path pattern>] ::=
[ link:/cypher-manual/25/syntax/naming/[<identifier>] "=" ] [ <path pattern prefix> ] <path pattern expression>
118 changes: 118 additions & 0 deletions modules/ROOT/images/railroad/match.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions modules/ROOT/pages/clauses/match.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,7 @@ This is because the xref:planning-and-tuning/execution-plans.adoc[Cypher planner

As a result, `MATCH` queries using dynamic values cannot leverage xref:planning-and-tuning/operators/operators-detail.adoc#leaf-operators[index scans or seeks] and must instead use the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-all-nodes-scan[`AllNodesScan`] operator, which reads all nodes from the node store and is therefore more costly.

== Syntax
:syntax-filename: match

include::partial$syntax.adoc[]
10 changes: 10 additions & 0 deletions modules/ROOT/partials/syntax.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[source, bnf, subs="+macros"]
----
include::example${syntax-filename}.bnf[]
----

.Railroad diagram
[%collapsible]
====
image::railroad/{syntax-filename}.svg["Railroad diagram for '{syntax-filename}'"]
====