Skip to content

Commit

Permalink
Add docs on newline chars in Cypher (#892)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Sill <[email protected]>
  • Loading branch information
gem-neo4j and rsill-neo4j authored Feb 29, 2024
1 parent 1da9e4a commit 727110d
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions modules/ROOT/pages/syntax/parsing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ The following unicode characters are considered as whitespace:

[options="header", cols="1,2"]
|===
| Description | List of included Unicode Characters
| Unicode General Category Zp | `\u2029`
| Unicode General Category Zs | `\u0020` (space), `\u1680`, `\u2000-200A`, `\u202F`, `\u205F`, `\u3000`
| Unicode General Category class Zl | `\u2028`
| Horizontal Tabulation | `\t`, `\u0009`
| Line Feed | `\n`, `\u000A`
| Vertical Tabulation | `\u000B`
| Form Feed | `\f`, `\u000C`
| Carriage Return | `\r`, `\u000D`
| File Separator | `\u001C`
| Group Separator | `\u001D`
| Record Separator | `\u001E`
| Unit Separator | `\u001F`
| Description | List of included Unicode characters
| Unicode general gategory Zp | `\u2029`
| Unicode general gategory Zs | `\u0020` (space), `\u1680`, `\u2000-200A`, `\u202F`, `\u205F`, `\u3000`
| Unicode general gategory class Zl | `\u2028`
| Horizontal tabulation | `\t`, `\u0009`
| Line feed | `\n`, `\u000A`
| Vertical tabulation | `\u000B`
| Form feed | `\f`, `\u000C`
| Carriage return | `\r`, `\u000D`
| File separator | `\u001C`
| Group separator | `\u001D`
| Record separator | `\u001E`
| Unit separator | `\u001F`
|===

It is possible to have multiple whitespace characters in a row, and will have the same effect as using a single whitespace.
Expand All @@ -54,4 +54,18 @@ The following example query uses vertical tabulation (`\u000B`) as whitespace be
[source, syntax]
----
MATCH (m) RETURN\u000Bm;
----
----

[[cypher-newlines]]
== Supported newline characters

A newline character identifies a new line in the query and is also considered whitespace.
The supported newline characters in Cypher are:

[options="header", cols="1,2"]
|===
| Description | List of included Unicode characters
| Line feed | `\n`, `\u000A`
| Carriage return | `\r`, `\u000D`
| Carriage return + line feed | `\r\n`, `\u000D\u000A`
|===

0 comments on commit 727110d

Please sign in to comment.