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
1 change: 1 addition & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
*** xref:appendix/gql-conformance/supported-optional.adoc[]
*** xref:appendix/gql-conformance/analogous-cypher.adoc[]
*** xref:appendix/gql-conformance/additional-cypher.adoc[]
** xref:appendix/grammar/index.adoc[]
** xref:appendix/tutorials/index.adoc[]
*** xref:appendix/tutorials/basic-query-tuning.adoc[]
*** xref:appendix/tutorials/advanced-query-tuning.adoc[]
5 changes: 5 additions & 0 deletions modules/ROOT/examples/syntax/clauses/call-procedure.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<call procedure statement> ::=
[ "OPTIONAL" ] "CALL" { <inline procedure call> | <named procedure call> }

<named procedure call> ::=
<procedure reference> <explicit procedure arguments> [ "YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ "WHERE" <search condition> ] ]
5 changes: 5 additions & 0 deletions modules/ROOT/examples/syntax/clauses/create.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<create statement> ::=
"CREATE" <create path pattern> [ { "," <create path pattern> }... ]

<create path pattern> ::=
[ link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "=" ] <create node pattern> [ { <create relationship pattern> <create node pattern> }... ]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/delete.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<delete statement> ::=
[ "DETACH" | "NODETACH" ] "DELETE" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ { "," link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] }... ]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/filter.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<filter statement> ::=
"FILTER" [ "WHERE" ] link:https://neo4j.com/docs/cypher-manual/current/expressions/[<boolean value expression>]
8 changes: 8 additions & 0 deletions modules/ROOT/examples/syntax/clauses/foreach.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<foreach statement> ::=
"FOREACH" "(" <foreach element source> <foreach action> ")"

<foreach element source> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "IN" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]

<foreach action> ::=
"|" { link:https://neo4j.com/docs/cypher-manual/current/clauses/create/[<create statement>] | link:https://neo4j.com/docs/cypher-manual/current/clauses/create/[<insert statement>] | link:https://neo4j.com/docs/cypher-manual/current/clauses/merge/[<merge statement>] | link:https://neo4j.com/docs/cypher-manual/current/clauses/set/[<set statement>] | link:https://neo4j.com/docs/cypher-manual/current/clauses/remove/[<remove statement>] | link:https://neo4j.com/docs/cypher-manual/current/clauses/delete/[<delete statement>] }...
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/let.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<let statement> ::=
"LET" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "=" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "=" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] }... ]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/limit.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<limit clause> ::=
"LIMIT" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]
8 changes: 8 additions & 0 deletions modules/ROOT/examples/syntax/clauses/load-csv.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<load csv statement> ::=
"LOAD CSV" [ "WITH HEADERS" ] <csv source> [ <csv field terminator> ]

<csv source> ::=
"FROM" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>]

<csv field terminator> ::=
"FIELDTERMINATOR" link:https://neo4j.com/docs/cypher-manual/current/syntax/parsing/[<character string literal>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/match.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<simple match statement> ::=
"MATCH" [ link:https://neo4j.com/docs/cypher-manual/current/patterns/match-modes/[<match mode>] ] link:https://neo4j.com/docs/cypher-manual/current/patterns/reference/#path-patterns[<path pattern>] [ { "," link:https://neo4j.com/docs/cypher-manual/current/patterns/reference/#path-patterns[<path pattern>] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/search/[<search clause>] ] | link:https://neo4j.com/docs/cypher-manual/current/clauses/search/[<search clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] ]
5 changes: 5 additions & 0 deletions modules/ROOT/examples/syntax/clauses/merge.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<merge statement> ::=
"MERGE" [ link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "=" ] <merge node pattern> [ { <merge relationship pattern> <merge node pattern> }... ] [ <merge action> ]

<merge action> ::=
"ON" { "MATCH" | "CREATE" } link:https://neo4j.com/docs/cypher-manual/current/clauses/set/[<set statement>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/optional-match.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<optional match statement> ::=
"OPTIONAL" link:https://neo4j.com/docs/cypher-manual/current/clauses/match/[<simple match statement>]
5 changes: 5 additions & 0 deletions modules/ROOT/examples/syntax/clauses/order-by.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<order by clause> ::=
"ORDER BY" <sort specification> [ { "," <sort specification> }... ]

<sort specification> ::=
link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ "ASC" | "ASCENDING" | "DESC" | "DESCENDING" ]
12 changes: 12 additions & 0 deletions modules/ROOT/examples/syntax/clauses/remove.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<remove statement> ::=
"REMOVE" <remove item> [ { "," <remove item> }... ]

<remove item> ::=
<remove labels item>
| <remove property item>

<remove labels item> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] { ":" <label> { ":" <label> }... | { "IS" | ":" } <label> }

<remove property item> ::=
link:https://neo4j.com/docs/cypher-manual/current/expressions/[<postfix expression>]
10 changes: 10 additions & 0 deletions modules/ROOT/examples/syntax/clauses/return.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<return statement> ::=
"RETURN" [ "ALL" | "DISTINCT" ] { "*" | <return item> } [ { "," <return item> }... ] [ <order by and page clause> ]

<return item> ::=
link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] ]

<order by and page clause> ::=
link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/search.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<search clause> ::=
"SEARCH" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "IN" "(" "VECTOR INDEX" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] "FOR" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ")" [ "SCORE AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ]
20 changes: 20 additions & 0 deletions modules/ROOT/examples/syntax/clauses/set.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<set statement> ::=
"SET" <set item> [ { "," <set item> }... ]

<set item> ::=
<set all properties item>
| <add all properties item>
| <set labels item>
| <set property item>

<set all properties item> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "=" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]

<add all properties item> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] "+=" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]

<set labels item> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] { ":" <label> { ":" <label> }... | { "IS" | ":" } <label> }

<set property item> ::=
link:https://neo4j.com/docs/cypher-manual/current/expressions/[<postfix expression>] "=" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]
9 changes: 9 additions & 0 deletions modules/ROOT/examples/syntax/clauses/show-functions.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<show functions statement> ::=
"SHOW" [ "ALL" | "BUILT IN" | "USER DEFINED" ] { "FUNCTION" | "FUNCTIONS" } [ <executable by> ] [ <show result clause> ]

<executable by> ::=
"EXECUTABLE" [ "BY CURRENT USER" | "BY" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] ]

<show result clause> ::=
"YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/return/[<return statement>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>]
9 changes: 9 additions & 0 deletions modules/ROOT/examples/syntax/clauses/show-procedures.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<show procedures statement> ::=
"SHOW" { "PROCEDURE" | "PROCEDURES" } [ <executable by> ] [ <show result clause> ]

<executable by> ::=
"EXECUTABLE" [ "BY CURRENT USER" | "BY" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] ]

<show result clause> ::=
"YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/return/[<return statement>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>]
6 changes: 6 additions & 0 deletions modules/ROOT/examples/syntax/clauses/show-settings.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<show settings statement> ::=
"SHOW" { "SETTING" | "SETTINGS" } [ *_setting_name_* ] [ <show result clause> ]

<show result clause> ::=
"YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/return/[<return statement>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>]
10 changes: 10 additions & 0 deletions modules/ROOT/examples/syntax/clauses/show-transactions.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<show transactions statement> ::=
"SHOW" { "TRANSACTION" | "TRANSACTIONS" } [ <character string list element list or expression> ] [ <show result clause> ]

<show result clause> ::=
"YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/return/[<return statement>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>]

<character string list element list or expression> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/parsing/[<character string literal>] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/parsing/[<character string literal>] }... ]
| link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/skip.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<offset clause> ::=
{ "SKIP" | "OFFSET" } link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<terminate transaction statement> ::=
"TERMINATE" { "TRANSACTION" | "TRANSACTIONS" } <character string list element list or expression> [ "YIELD" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>] ] }... ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/return/[<return statement>] ] ]

<character string list element list or expression> ::=
link:https://neo4j.com/docs/cypher-manual/current/syntax/parsing/[<character string literal>] [ { "," link:https://neo4j.com/docs/cypher-manual/current/syntax/parsing/[<character string literal>] }... ]
| link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/unwind.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<unwind statement> ::=
"UNWIND" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<binding variable>]
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/use.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<use graph clause> ::=
"USE" <graph expression>
2 changes: 2 additions & 0 deletions modules/ROOT/examples/syntax/clauses/where.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<where clause> ::=
"WHERE" link:https://neo4j.com/docs/cypher-manual/current/expressions/[<boolean value expression>]
10 changes: 10 additions & 0 deletions modules/ROOT/examples/syntax/clauses/with.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<with statement> ::=
"WITH" [ "ALL" | "DISTINCT" ] { "*" | <return item> } [ { "," <return item> }... ] [ <order by and page clause> ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/where/[<where clause>] ]

<return item> ::=
link:https://neo4j.com/docs/cypher-manual/current/expressions/[<value expression>] [ "AS" link:https://neo4j.com/docs/cypher-manual/current/syntax/naming/[<identifier>] ]

<order by and page clause> ::=
link:https://neo4j.com/docs/cypher-manual/current/clauses/order-by/[<order by clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] ] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/skip/[<offset clause>] [ link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>] ]
| link:https://neo4j.com/docs/cypher-manual/current/clauses/limit/[<limit clause>]
Loading