-
Notifications
You must be signed in to change notification settings - Fork 67
Add syntax snippets #1390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
nvitucci
wants to merge
7
commits into
dev
Choose a base branch
from
add-syntax-snippets
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add syntax snippets #1390
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1c0300c
Add first round of grammar snippets
nvitucci 411485c
Merge branch 'dev' into add-syntax-snippets
nvitucci 23d449c
Add first round of railroad diagrams
nvitucci 0b130fa
Test commit for deployment
nvitucci 1f589d2
Add example of full grammar
nvitucci ab9c985
Fix whole grammar
nvitucci 8a3242b
Merge branch 'dev' into add-syntax-snippets
nvitucci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <call procedure statement> ::= | ||
| [ "OPTIONAL" ] "CALL" <procedure call> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <create statement> ::= | ||
| "CREATE" <create graph pattern> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <delete statement> ::= | ||
| [ "DETACH" | "NODETACH" ] "DELETE" <delete item list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <filter statement> ::= | ||
| "FILTER" [ "WHERE" ] <search condition> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <foreach statement> ::= | ||
| "FOREACH" "(" <foreach element source> <foreach action> ")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <let statement> ::= | ||
| "LET" <let variable definition list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <limit clause> ::= | ||
| "LIMIT" <value expression> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <load csv statement> ::= | ||
| "LOAD CSV" [ "WITH HEADERS" ] <csv source> [ <csv field terminator> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <simple match statement> ::= | ||
| "MATCH" <graph pattern> | ||
|
|
||
| <graph pattern> ::= | ||
| [ <match mode> ] <path pattern> [ { "," <path pattern> }... ] [ <graph pattern where clause> ] | ||
|
|
||
| <match mode> ::= | ||
| "REPEATABLE" { "ELEMENT" [ "BINDINGS" ] | "ELEMENTS" } | ||
| | "DIFFERENT" { "RELATIONSHIP" [ "BINDINGS" ] | "RELATIONSHIPS" } | ||
|
|
||
| <path pattern> ::= | ||
| [ <identifier> "=" ] [ <path pattern prefix> ] <path pattern expression> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <merge statement> ::= | ||
| "MERGE" <merge graph pattern> [ <merge action> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <optional match statement> ::= | ||
| "OPTIONAL" <optional match operand> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <order by clause> ::= | ||
| "ORDER BY" <sort specification list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <remove statement> ::= | ||
| "REMOVE" <remove item list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <return statement> ::= | ||
| "RETURN" <return statement body> [ <order by and page clause> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <set statement> ::= | ||
| "SET" <set item list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" <user name> ] | ||
|
|
||
| <show result clause> ::= | ||
| "YIELD" <yield item list> [ <order by clause> ] [ <offset clause> ] [ <limit clause> ] [ <where clause> ] [ <return statement> ] | ||
| | <where clause> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <show procedures statement> ::= | ||
| "SHOW" <procedure keywords> [ <executable by> ] [ <show result clause> ] | ||
nvitucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <show settings statement> ::= | ||
| "SHOW" <setting keywords> [ <character string list element list or expression> ] [ <show result clause> ] | ||
nvitucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <show transactions statement> ::= | ||
| "SHOW" { "TRANSACTION" | "TRANSACTIONS" } [ <character string list element list or expression> ] [ <show result clause> ] | ||
|
|
||
| <show result clause> ::= | ||
| "YIELD" <yield item list> [ <order by clause> ] [ <offset clause> ] [ <limit clause> ] [ <where clause> ] [ <return statement> ] | ||
| | <where clause> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <offset clause> ::= | ||
| <offset synonym> <value expression> |
5 changes: 5 additions & 0 deletions
5
modules/ROOT/examples/syntax/clauses/terminate-transactions.bnf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <terminate transaction statement> ::= | ||
| "TERMINATE" { "TRANSACTION" | "TRANSACTIONS" } <character string list element list or expression> [ <show yield result clause> ] | ||
|
|
||
| <show yield result clause> ::= | ||
| "YIELD" <yield item list> [ <order by clause> ] [ <offset clause> ] [ <limit clause> ] [ <where clause> ] [ <return statement> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <unwind statement> ::= | ||
| "UNWIND" <value expression> "AS" <binding variable> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <use graph clause> ::= | ||
| "USE" <graph expression> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <where clause> ::= | ||
| "WHERE" <search condition> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <with statement> ::= | ||
| "WITH" <return statement body> [ <order by and page clause> ] [ <where clause> ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| <create constraint statement> ::= | ||
| "CREATE CONSTRAINT" [ <constraint name> | <general parameter reference> ] [ "IF NOT EXISTS" ] <constraint specification> [ <command options> ] | ||
|
|
||
| <command options> ::= | ||
| "OPTIONS" <map value or parameter specification> | ||
|
|
||
| <property names specification> ::= | ||
| <property name specification> | ||
| | "(" <property name specification> [ { "," <property name specification> }... ] ")" | ||
|
|
||
| <property name specification> ::= | ||
| <binding variable> "." <property name> | ||
|
|
||
| <constraint specification> ::= | ||
| <node constraint specification> | ||
| | <relationship constraint specification> | ||
|
|
||
| <node constraint specification> ::= | ||
| <node key constraint> | ||
| | <node uniqueness constraint> | ||
| | <node property existence constraint> | ||
| | <node property type constraint> | ||
|
|
||
| <relationship constraint specification> ::= | ||
| <relationship key constraint> | ||
| | <relationship uniqueness constraint> | ||
| | <relationship property existence constraint> | ||
| | <relationship property type constraint> | ||
|
|
||
| <node key constraint> ::= | ||
| "FOR" <command node pattern> "REQUIRE" <property names specification> "IS" [ "NODE" ] "KEY" | ||
|
|
||
| <node uniqueness constraint> ::= | ||
| "FOR" <command node pattern> "REQUIRE" <property names specification> "IS" [ "NODE" ] "UNIQUE" | ||
|
|
||
| <node property existence constraint> ::= | ||
| "FOR" <command node pattern> "REQUIRE" <property name specification> "IS NOT NULL" | ||
|
|
||
| <node property type constraint> ::= | ||
| "FOR" <command node pattern> "REQUIRE" <property name specification> { [ "IS" ] "::" | "IS TYPED" } <value type> | ||
|
|
||
| <relationship key constraint> ::= | ||
| "FOR" <command relationship pattern> "REQUIRE" <property names specification> "IS" [ "RELATIONSHIP" | "REL" ] "KEY" | ||
|
|
||
| <relationship uniqueness constraint> ::= | ||
| "FOR" <command relationship pattern> "REQUIRE" <property names specification> "IS" [ "RELATIONSHIP" | "REL" ] "UNIQUE" | ||
|
|
||
| <relationship property existence constraint> ::= | ||
| "FOR" <command relationship pattern> "REQUIRE" <property name specification> "IS NOT NULL" | ||
|
|
||
| <relationship property type constraint> ::= | ||
| "FOR" <command relationship pattern> "REQUIRE" <property name specification> { [ "IS" ] "::" | "IS TYPED" } <value type> | ||
|
|
||
| <command node pattern> ::= | ||
| "(" <binding variable> ":" <label name> ")" | ||
|
|
||
| <command relationship pattern> ::= | ||
| "()" { "<-[" <binding variable> ":" <label name> "]-" | "-[" <binding variable> ":" <label name> "]->" | "<-[" <binding variable> ":" <label name> "]->" | "-[" <binding variable> ":" <label name> "]-" } "()" | ||
nvitucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <map value or parameter specification> ::= | ||
| <map value constructor> | ||
| | <general parameter reference> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <drop constraint statement> ::= | ||
| "DROP CONSTRAINT" <constraint name specification> [ "IF EXISTS" ] | ||
|
|
||
| <constraint name specification> ::= | ||
| <constraint name> | ||
| | <general parameter reference> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <show constraints statement> ::= | ||
| "SHOW" [ <show constraint type> ] <constraint keywords> [ <show result clause> ] | ||
nvitucci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <show constraint type> ::= | ||
| <show all constraints> | ||
| | <show key constraints> | ||
| | <show uniqueness constraints> | ||
| | <show property existence constraints> | ||
| | <show property type constraints> | ||
|
|
||
| <show all constraints> ::= | ||
| "ALL" | ||
|
|
||
| <show key constraints> ::= | ||
| [ "NODE" | "RELATIONSHIP" | "REL" ] "KEY" | ||
|
|
||
| <show uniqueness constraints> ::= | ||
| [ "NODE" | "RELATIONSHIP" | "REL" ] [ "PROPERTY" ] { "UNIQUENESS" | "UNIQUE" } | ||
|
|
||
| <show property existence constraints> ::= | ||
| [ "NODE" | "RELATIONSHIP" | "REL" ] [ "PROPERTY" ] { "EXISTENCE" | "EXIST" } | ||
|
|
||
| <show property type constraints> ::= | ||
| [ "NODE" | "RELATIONSHIP" | "REL" ] "PROPERTY TYPE" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.