Skip to content

Commit ca9e51d

Browse files
fix list examples
1 parent 50ba639 commit ca9e51d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

modules/ROOT/pages/expressions/index.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ For details and examples of specific expressions, see the following sections:
55

66
* xref:expressions/expressions-overview.adoc[]
77
* xref:expressions/predicates/index.adoc[]
8-
** xref:expressions/predicates/operators.adoc[]
9-
** xref:expressions/predicates/type-predicate-expressions.adoc[]
10-
** xref:expressions/predicates/path-pattern-expressions.adoc[]
8+
** xref:expressions/predicates/boolean-operators.adoc[]: `AND`, `OR`, `XOR`, `NOT`
9+
** xref:expressions/predicates/comparison-operators.adoc[]: `=`, `<>`, `<`, `>`, `\<=`, `>=`, `IS NULL`, `IS NOT NULL`
10+
** xref:expressions/predicates/string-operators.adoc[]: `STARTS WITH`, `ENDS WITH`, `CONTAINS`, `IS NORMALIZED`, `IS NOT NORMALIZED`, `=~`
11+
** xref:expressions/predicates/list-operators.adoc[]: `IN`
12+
** xref:expressions/predicates/path-pattern-expressions.adoc[]: information about filtering queries with path pattern expressions.
13+
** xref:expressions/predicates/type-predicate-expressions.adoc[]: information about how to verify the value type of a Cypher expression.
1114
* xref:expressions/conditional-expressions.adoc[]

modules/ROOT/pages/expressions/predicates/list-operators.adoc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ Cypher contains the following list operator:
77

88
* Membership: `IN`
99
10-
1110
For additional list predicates, see:
1211

13-
* The following quantifier predicates: xref:functions/predicate.adoc#functions-all[`all()`], xref:functions/predicate.adoc#functions-any[`any()`], xref:functions/predicate.adoc#functions-none[`none()`], and xref:functions/predicate.adoc#functions-single[`single()`].
12+
* The following predicate functions: xref:functions/predicate.adoc#functions-all[`all()`], xref:functions/predicate.adoc#functions-any[`any()`], xref:functions/predicate.adoc#functions-none[`none()`], and xref:functions/predicate.adoc#functions-single[`single()`].
1413
* The xref:functions/predicate.adoc#functions-isempty[`isEmpty()`] function.
1514
1615
[[example-graph]]
@@ -128,7 +127,7 @@ RETURN NULL IN [1, 2, NULL] AS nullInList, 123 IN NULL AS valueInNull
128127
2+d|Rows: 1
129128
|===
130129

131-
To check if `NULL` is a member of a `LIST`, use a xref: functions/predicate.adoc[predicate function] such as xref:functions/predicate.adoc#functions-any[`any()`]:
130+
To check if `NULL` is a member of a `LIST`, use the xref:functions/predicate.adoc#functions-any[`any()`] function:
132131

133132
.Checking if `NULL` is a member of a `LIST`
134133
[source, cypher]
@@ -150,10 +149,9 @@ RETURN any(x IN [1, 2, NULL] WHERE x IS NULL) AS containsNull
150149
== Nested lists
151150

152151
When used with nested `LIST` values, the `IN` operator evaluates whether a `LIST` is an exact match to any of the nested `LIST` values that are part of an outer `LIST`.
153-
The operator checks for exact matches, meaning that it will only return `TRUE` when the entire nested `LIST` matches one of the `LIST` values within the outer `LIST`.
154-
Partial matches or individual elements within a nested `LIST` will return `FALSE`.
152+
Partial matches of individual elements within a nested `LIST` will return `FALSE`.
155153

156-
.Nested `LIST` values
154+
.Checking for membership in nested `LIST` values
157155
=====
158156
159157
.Checking if a `LIST` is in a `LIST` of nested `LIST` values
@@ -211,10 +209,10 @@ RETURN [1] IN [[1, 2], [3, 4]] AS listInNestedTest
211209
== List subsets
212210

213211
A subset check verifies if all elements of one `LIST` exist in another.
214-
Set checks ignores `LIST` order and groupings, and does not require exact sublist matches.
212+
In other words, it ignores `LIST` order and groupings.
215213
The xref:functions/predicate.adoc#functions-all[`all()`] function is used to ensure that every element in the first `LIST` is found in the second `LIST`.
216214

217-
.Sublist check
215+
.Subset check
218216
[source, cypher]
219217
----
220218
WITH [1,3,4] AS sub, [3,5,1,7,6,2,8,4] AS list
@@ -233,7 +231,7 @@ This returns `TRUE` because all elements in `sub` are part of `list`.
233231
1+d|Rows: 1
234232
|===
235233

236-
.Sublist check
234+
.Subset check
237235
[source, cypher]
238236
----
239237
WITH [1,3,9] AS sub, [3,5,1,7,6,2,8,4] AS list

0 commit comments

Comments
 (0)