From 9eab45a62344a8c052aa405ee4ccdd83647b5609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 30 Jan 2025 09:42:11 +0100 Subject: [PATCH 1/4] better Unicode example --- modules/ROOT/pages/syntax/parsing.adoc | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/modules/ROOT/pages/syntax/parsing.adoc b/modules/ROOT/pages/syntax/parsing.adoc index 54db83bde..61aa6244c 100644 --- a/modules/ROOT/pages/syntax/parsing.adoc +++ b/modules/ROOT/pages/syntax/parsing.adoc @@ -6,10 +6,31 @@ This page provides a general overview of how Cypher parses an input `STRING`. The Cypher parser takes an arbitrary input `STRING`. -While the syntax of Cypher is described in subsequent chapters, the following details the general rules on which characters are considered valid input. +This page details the general rules on which characters are considered valid input. == Using unicodes in Cypher + Unicodes can generally be escaped as `\uxxx`. +In the below example, the Unicode `\u03B1\u03B2` is used to create a property named `αβ`. + +.Using Unicodes in property names +[source, cypher] +---- +CREATE (n:Test {\u03B1\u03B2: "AlphaBetaExample"}) +WITH n +MATCH (n:Test) +RETURN properties(n) AS property +---- + +.Result +[role="queryresult",options="header,footer",cols="1* Date: Thu, 30 Jan 2025 10:05:18 +0100 Subject: [PATCH 2/4] new example --- modules/ROOT/pages/syntax/parsing.adoc | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/modules/ROOT/pages/syntax/parsing.adoc b/modules/ROOT/pages/syntax/parsing.adoc index 61aa6244c..bb9592405 100644 --- a/modules/ROOT/pages/syntax/parsing.adoc +++ b/modules/ROOT/pages/syntax/parsing.adoc @@ -11,27 +11,16 @@ This page details the general rules on which characters are considered valid inp == Using unicodes in Cypher Unicodes can generally be escaped as `\uxxx`. -In the below example, the Unicode `\u03B1\u03B2` is used to create a property named `αβ`. +For example, the below query uses the Unicode `u00B0` to search for any recipe descriptions containing the degree symbol, `º`: -.Using Unicodes in property names +.Using Unicodes in `STRING` matching [source, cypher] ---- -CREATE (n:Test {\u03B1\u03B2: "AlphaBetaExample"}) -WITH n -MATCH (n:Test) -RETURN properties(n) AS property +MATCH (r:Recepy) +WHERE r.Description CONTAINS "\u00B0" +RETURN r ---- -.Result -[role="queryresult",options="header,footer",cols="1* Date: Thu, 30 Jan 2025 10:06:55 +0100 Subject: [PATCH 3/4] spelling --- modules/ROOT/pages/syntax/parsing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/syntax/parsing.adoc b/modules/ROOT/pages/syntax/parsing.adoc index bb9592405..e4316fc4f 100644 --- a/modules/ROOT/pages/syntax/parsing.adoc +++ b/modules/ROOT/pages/syntax/parsing.adoc @@ -16,7 +16,7 @@ For example, the below query uses the Unicode `u00B0` to search for any recipe d .Using Unicodes in `STRING` matching [source, cypher] ---- -MATCH (r:Recepy) +MATCH (r:Recipe) WHERE r.Description CONTAINS "\u00B0" RETURN r ---- From c39ff599aa4485920a087113cf4b4b39bea707ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:10:07 +0100 Subject: [PATCH 4/4] format --- modules/ROOT/pages/syntax/parsing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/syntax/parsing.adoc b/modules/ROOT/pages/syntax/parsing.adoc index e4316fc4f..66887f583 100644 --- a/modules/ROOT/pages/syntax/parsing.adoc +++ b/modules/ROOT/pages/syntax/parsing.adoc @@ -17,7 +17,7 @@ For example, the below query uses the Unicode `u00B0` to search for any recipe d [source, cypher] ---- MATCH (r:Recipe) -WHERE r.Description CONTAINS "\u00B0" +WHERE r.description CONTAINS "\u00B0" RETURN r ----