Skip to content
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

Add docs on newline chars in Cypher #892

Merged
merged 3 commits into from
Feb 29, 2024
Merged
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
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`
|===
Loading