Skip to content
Merged
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
18 changes: 9 additions & 9 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@
** xref:patterns/reference.adoc[]

* xref:values-and-types/index.adoc[]
** xref:values-and-types/property-structural-constructed.adoc[]
** xref:values-and-types/temporal.adoc[]
** xref:values-and-types/spatial.adoc[]
** xref:values-and-types/working-with-null.adoc[]
** xref:values-and-types/lists.adoc[]
** xref:values-and-types/maps.adoc[]
** xref:values-and-types/casting-data.adoc[]
** xref::values-and-types/property-structural-constructed.adoc[]
** xref:values-and-types/boolean-numeric-string.adoc[]
** xref::values-and-types/temporal.adoc[]
** xref::values-and-types/spatial.adoc[]
** xref::values-and-types/lists.adoc[]
** xref::values-and-types/maps.adoc[]
** xref:values-and-types/graph-references.adoc[]
** xref::values-and-types/working-with-null.adoc[]
** xref::values-and-types/casting-data.adoc[]
** xref:values-and-types/ordering-equality-comparison.adoc[]

* xref:expressions/index.adoc[]
** xref:expressions/expressions-overview.adoc[]
** xref:expressions/predicates/index.adoc[]
*** xref:expressions/predicates/boolean-operators.adoc[]
*** xref:expressions/predicates/comparison-operators.adoc[]
Expand Down Expand Up @@ -135,7 +136,6 @@
** xref:syntax/variables.adoc[]
** xref:syntax/keywords.adoc[]
** xref:syntax/parameters.adoc[]
** xref:syntax/operators.adoc[]
** xref:syntax/comments.adoc[]

* xref:deprecations-additions-removals-compatibility.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ GQL supports `GRAPH TYPES` as a way of constraining a graph schema, but does not
| Cypher feature
| Description

| xref:syntax/operators.adoc#query-operator-comparison-string-specific[`STARTS WITH`, `CONTAINS`, `ENDS WITH`, and regular expressions].
| xref:expressions/predicates/string-operators.adoc[`STARTS WITH`, `CONTAINS`, `ENDS WITH`, and regular expressions].
| `STRING` comparison operators.

| xref:expressions/predicates/list-operators.adoc[`IN`]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.ado

| 19.3
| <comparison predicate>
| xref:syntax/operators.adoc##query-operators-comparison[Comparison operators]
| xref:expressions/predicates/comparison-operators.adoc[Comparison operators]
|

| 19.4
Expand All @@ -152,12 +152,12 @@ The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.ado

| 19.7
| <normalized predicate>
| xref:syntax/operators.adoc#match-string-is-normalized[`IS NORMALIZED`], xref:syntax/operators.adoc#match-string-is-not-normalized[`IS NOT NORMALIZED`]
| xref:expressions/predicates/string-operators.adoc#string-normalization-operators[`IS NORMALIZED`,`IS NOT NORMALIZED`]
|

| 20.2
| <value expression primary>
| xref:expressions/expressions-overview.adoc[]
| xref:expressions/index.adoc[]
|

| 20.3
Expand Down Expand Up @@ -194,7 +194,7 @@ For example, `RETURN sum(<expr>)` on an empty table returns `NULL` in GQL, but i

| 20.23
| <string value expression>
| xref:syntax/operators.adoc#syntax-concatenating-two-strings-doublebar[`STRING` concatenation operator (`\|\|`)]
| xref:expressions/string-operators.adoc[`STRING` concatenation operator (`\|\|`)]
|

| 20.24
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Cypher only supports xref:functions/mathematical-numeric.adoc#functions-ceil[`ce
| Note the following exceptions:

* Cypher uses the xref:functions/mathematical-logarithmic.adoc#functions-log[`log()`] function instead of GQL's `LN()` function.
* Cypher uses the xref:syntax/operators.adoc#syntax-using-the-exponentiation-operator[exponentiation operator (`^`)] instead of GQL's `POWER()` function.
* Cypher uses the xref:expressions/mathematical-operators.adoc[exponentiation operator (`^`)] instead of GQL's `POWER()` function.

| GF05
| Multi-character trim functions
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/match.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ RETURN p.name AS actor, r.role AS role
----

[NOTE]
The above query uses the xref:syntax/operators.adoc#query-operator-comparison-string-specific[`CONTAINS` operator].
The above query uses the xref:expressions/predicates/string-operators.adoc[`CONTAINS` operator].

.Result
[role="queryresult",options="header,footer",cols="2*<m"]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/order-by.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`ORDER BY` specifies how the output of a clause should be sorted.
It be used as a sub-clause following `RETURN` or `WITH`.

`ORDER BY` relies on comparisons to sort the output, see xref::syntax/operators.adoc#cypher-ordering[Ordering and comparison of values].
`ORDER BY` relies on comparisons to sort the output, see xref:values-and-types/ordering-equality-comparison.adoc[Ordering and comparison of values].
You can sort on many different values, e.g. node/relationship properties, the node/relationship ids, or on most expressions.

[NOTE]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/use.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ When connected to a composite database, a graph reference may additionally be pa

* The graph function xref:functions/graph.adoc#functions-graph-byname[`graph.byName()`], which allows the graph reference to be resolved dynamically: `USE graph.byName(<string-expression>)`.

A more detailed description of how and when a graph references needs to be quoted and/or escaped is defined xref::expressions/expressions-overview.adoc#graphreferences[here].
A more detailed description of how and when a graph references needs to be quoted and/or escaped is defined xref::values-and-types/graph-references.adoc#rules[here].

== USE clause when connected to a standard or system database

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ USE graph.byName('tom`s-database')

USE graph.propertiesByName('database.with.dot')
----
| xref::expressions/expressions-overview.adoc#graphreferences[Graph references] in arguments of the functions xref:functions/graph.adoc#functions-graph-byname[`graph.byName`] and xref:functions/graph.adoc#functions-graph-propertiesByName[`graph.propertiesByName`] in Cypher 25 are parsed as `<symbolic-name>` or `<symbolic-name>.<symbolic-name>` and now support escaping names.
| xref::values-and-types/graph-references.adoc[Graph references] in arguments of the functions xref:functions/graph.adoc#functions-graph-byname[`graph.byName`] and xref:functions/graph.adoc#functions-graph-propertiesByName[`graph.propertiesByName`] in Cypher 25 are parsed as `<symbolic-name>` or `<symbolic-name>.<symbolic-name>` and now support escaping names.
For more information, see xref:syntax/expressions.adoc#graph-references[Cypher expressions -> Graph references].
Graph name parts that contain unsupported characters for unescaped symbolic names now require backtick quoting.
Graph name parts with special characters may require additional escaping of those characters:
Expand Down Expand Up @@ -1152,7 +1152,7 @@ RETURN "Hello" \|\| " " \|\| "World";

RETURN [1, 2] \|\| [3, 4, 5];
----
| Added a new `STRING` and `LIST` xref:syntax/operators.adoc[concatenation operator].
| Added a new `STRING` and `LIST` xref:expressions/string-operators.adoc[concatenation operator].

a|
label:functionality[]
Expand Down Expand Up @@ -1353,7 +1353,7 @@ IS [NOT] [NFC \| NFD \| NFKC \| NFKD] NORMALIZED
RETURN "string" IS NORMALIZED
----

| Introduction of an xref::syntax/operators.adoc#match-string-is-normalized[IS NORMALIZED] operator.
| Introduction of an xref::expressions/predicates/string-operators.adoc#string-normalization-operator[IS NORMALIZED] operator.
The operator can be used to check if a `STRING` is normalized according to the specified normalization form, which can be of type `NFC`, `NFD`, `NFKC`, or `NFKD`.

a|
Expand Down
11 changes: 6 additions & 5 deletions modules/ROOT/pages/expressions/conditional-expressions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ implied equals (`=`) comparator.

The supported comparators are:

* xref::syntax/operators.adoc#query-operators-comparison[Regular Comparison Operators]: `+=+`, `+<>+`, `+<+`, `+>+`, `+<=+`, `+>=+`
* xref:values-and-types/working-with-null.adoc#is-null-is-not-null[`IS NULL` Operator]: `IS [NOT] NULL`
* xref:expressions/predicates/type-predicate-expressions.adoc[Type Predicate Expression]: `IS [NOT] TYPED <TYPE>` (Note that the form `IS [NOT] :: <TYPE>` is not accepted)
* xref::syntax/operators.adoc#match-string-is-normalized[Normalization Predicate Expression]: `IS [NOT] NORMALIZED`
* xref::syntax/operators.adoc#query-operator-comparison-string-specific[String Comparison Operators]: `STARTS WITH`, `ENDS WITH`, `=~` (regex matching)
* xref:expressions/predicates/comparison-operators.adoc[Regular Comparison Operators]: `+=+`, `+<>+`, `+<+`, `+>+`, `+<=+`, `+>=+`
* xref:expressions/predicates/comparison-operators.adoc[`IS [NOT] NULL`]
* xref:expressions/predicates/type-predicate-expressions.adoc[Type predicate expressions]: `IS [NOT] TYPED <TYPE>` (Note that the form `IS [NOT] :: <TYPE>` is not accepted)
* xref:expressions/predicates/string-operators.adoc[Normalization Predicate Expression]: `IS [NOT] NORMALIZED`
* xref:expressions/predicates/string-operators.adoc[String Comparison Operators]: `STARTS WITH`, `ENDS WITH`, `=~` (regex matching)


=== Syntax

Expand Down
108 changes: 0 additions & 108 deletions modules/ROOT/pages/expressions/expressions-overview.adoc

This file was deleted.

16 changes: 14 additions & 2 deletions modules/ROOT/pages/expressions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
:description: Information about the expressions available in Cypher.
:page-aliases: syntax/operators.adoc


A Cypher expression is any part of a query that evaluates to a value.
For details and examples of specific expressions, see the following sections:

* xref:expressions/expressions-overview.adoc[]
* xref:expressions/predicates/index.adoc[]
** xref:expressions/predicates/boolean-operators.adoc[]: `AND`, `OR`, `XOR`, `NOT`
** xref:expressions/predicates/comparison-operators.adoc[]: `=`, `<>`, `<`, `>`, `\<=`, `>=`, `IS NULL`, `IS NOT NULL`
Expand All @@ -21,3 +19,17 @@ For details and examples of specific expressions, see the following sections:
* xref:expressions/list-expressions.adoc[]: information about list concatenation operators (`||`, `+`), list element access, list slicing, and list as well as pattern comprehensions.
* xref:expressions/map-expressions.adoc[]: information about map operators (`.`, `[]`) and map projection.
* xref:expressions/conditional-expressions.adoc[]

The following expressions are documented elsewhere in the Cypher Manual:

* xref:patterns/reference.adoc#label-expressions[Label expressions]
* xref:functions/index.adoc[Function calls]
* Subquery expressions: xref:subqueries/collect.adoc[`COLLECT`], xref:subqueries/count.adoc[`COUNT`], and xref:subqueries/existential.adoc[`EXISTS`]
* Value literals (see xref:values-and-types/index.adoc[])
* xref:values-and-types/graph-references.adoc[]

[NOTE]
Expressions containing unsanitized user input may make your application vulnerable to Cypher injection.
Consider using xref:syntax/parameters.adoc[parameters] instead.
For more information, see link:https://neo4j.com/developer/kb/protecting-against-cypher-injection/[Neo4j Knowledge Base -> Protecting against Cypher Injection].

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:table-caption!:
:description: Information about path pattern expressions in Cypher.

Similar to xref::subqueries/existential.adoc[existential subqueries], path pattern expressions can be used to assert whether a specified path exists at least once in a graph.
Similar to xref::subqueries/existential.adoc[`EXISTS` subqueries], path pattern expressions can be used to assert whether a specified path exists at least once in a graph.
While existential subqueries are more powerful and capable of performing anything achievable with path pattern expressions, path pattern expressions are more concise.

For more information about graph pattern matching in Cypher, see xref:patterns/index.adoc[].
Expand All @@ -20,7 +20,7 @@ In other words, it must contain at least one xref::patterns/reference.adoc#relat
* Path pattern expressions may not declare new variables.
They can only reference existing variables.

* Path pattern expressions may only be used in positions where a xref:expressions/expressions-overview.adoc#boolean[boolean expression] is expected.
* Path pattern expressions may only be used in positions where a xref:expressions/predicates/boolean-operators.adoc[boolean expression] is expected.
The following sections will demonstrate how to use path pattern expressions in a `WHERE` clause.

[[example-graph]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ RETURN n.name AS name, n.email AS email
|===

Note that the regular expression constructs in
link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html[Java regular expressions] are applied only after resolving the escaped character sequences in the given xref::expressions/expressions-overview.adoc#expressions-string-literals[string literal].
link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html[Java regular expressions] are applied only after resolving the escaped character sequences in the given xref::values-and-types/boolean-numeric-string.adoc#string[string literal].
It is sometimes necessary to add additional backslashes to express regular expression constructs.
This list clarifies the combination of these two definitions, containing the original escape sequence and the resulting character in the regular expression:

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/functions/predicate.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ RETURN any(i IN emptyList WHERE true) as anyTrue, any(i IN emptyList WHERE false

[NOTE]
====
To check if a property is not `null` use the xref::syntax/operators.adoc#cypher-comparison[`IS NOT NULL` predicate].
To check if a property is not `null` use the xref:expressions/predicates/comparison-operators.adoc[`IS NOT NULL` predicate].
====

.+exists()+
Expand Down Expand Up @@ -330,7 +330,7 @@ The `name` property of each node that has an empty `STRING` `address` property i
The function `isEmpty()`, like most other Cypher functions, returns `null` if `null` is passed in to the function.
That means that a predicate `isEmpty(n.address)` will filter out all nodes where the `address` property is not set.
Thus, `isEmpty()` is not suited to test for `null`-values.
xref:syntax/operators.adoc#cypher-comparison[`IS NULL` or `IS NOT NULL`] should be used for that purpose.
xref:expressions/predicates/comparison-operators.adoc[`IS NULL` or `IS NOT NULL`] should be used for that purpose.
====


Expand Down
Loading