diff --git a/modules/ROOT/examples/MATCH.bnf b/modules/ROOT/examples/MATCH.bnf new file mode 100644 index 000000000..004e313c1 --- /dev/null +++ b/modules/ROOT/examples/MATCH.bnf @@ -0,0 +1,14 @@ +# MATCH clause short + + ::= + "MATCH" + + ::= + [ ] link:/cypher-manual/25/patterns/reference/#path-patterns[] [ { "," link:/cypher-manual/25/patterns/reference/#path-patterns[] }... ] [ ] + + ::= + "REPEATABLE" { "ELEMENT" [ "BINDINGS" ] | "ELEMENTS" } + | "DIFFERENT" { "RELATIONSHIP" [ "BINDINGS" ] | "RELATIONSHIPS" } + +link:/cypher-manual/25/patterns/reference/#path-patterns[] ::= + [ link:/cypher-manual/25/syntax/naming/[] "=" ] [ ] \ No newline at end of file diff --git a/modules/ROOT/images/railroad/match.svg b/modules/ROOT/images/railroad/match.svg new file mode 100644 index 000000000..58baa30fe --- /dev/null +++ b/modules/ROOT/images/railroad/match.svg @@ -0,0 +1,118 @@ + + +simple match statement + + +MATCH +graph patterngraph pattern + + +graph pattern + + + + + + +match modematch mode +path patternpath patternpath pattern + + + + + + + + + +, +path patternpath patternpath pattern + + + + + +graph pattern where clausegraph pattern where clause + + +match mode + + +REPEATABLE + + + +ELEMENT + + + + +BINDINGS + +ELEMENTS + +DIFFERENT + + + +RELATIONSHIP + + + + +BINDINGS + +RELATIONSHIPS + + +path pattern + + + + + + +identifieridentifieridentifier += + + + + +path pattern prefixpath pattern prefix +path pattern expressionpath pattern expression \ No newline at end of file diff --git a/modules/ROOT/pages/clauses/match.adoc b/modules/ROOT/pages/clauses/match.adoc index 207483bde..7ecd0371f 100644 --- a/modules/ROOT/pages/clauses/match.adoc +++ b/modules/ROOT/pages/clauses/match.adoc @@ -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[] diff --git a/modules/ROOT/partials/syntax.adoc b/modules/ROOT/partials/syntax.adoc new file mode 100644 index 000000000..b1dc213c4 --- /dev/null +++ b/modules/ROOT/partials/syntax.adoc @@ -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}'"] +====