Skip to content

Commit e8ef6d0

Browse files
Add collection function docs (#1408)
Co-authored-by: Richard Sill <[email protected]>
1 parent 7374e7e commit e8ef6d0

File tree

3 files changed

+481
-1
lines changed

3 files changed

+481
-1
lines changed

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,35 @@ Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+
2222
Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with `CYPHER 5` or by having Cypher 5 as the default language for the database.
2323
For more information, see xref:queries/select-version.adoc[].
2424

25+
[[cypher-deprecations-additions-removals-2025.11]]
26+
== Neo4j 2025.11
27+
28+
=== Updated in Cypher 25
29+
30+
[cols="2", options="header"]
31+
|===
32+
| Feature
33+
| Details
34+
35+
a|
36+
label:functionality[]
37+
label:new[]
38+
[source, cypher, role="noheader"]
39+
----
40+
RETURN coll.distinct([true, false, false, true, true, false])
41+
RETURN coll.flatten([1, [2]]), coll.flatten([false, ['a']], 2);
42+
RETURN coll.indexOf(['A', 'new', 'function'], 'new');
43+
RETURN coll.insert([1, 2, 4], 2, 3);
44+
RETURN coll.max([1.5, 2, 5.4, 0, 4]);
45+
RETURN coll.min([1.5, 2, 5.4, 0, 4]);
46+
RETURN coll.remove(['a', 'a', 'b', 'c', 'd'], 2);
47+
RETURN coll.sort([3, 1, 4, 2, 'a', 'c', 'b']);
48+
----
49+
| Introduction of eight new collection-based Cypher functions.
50+
For more information, see xref:functions/list.adoc[List functions - lists].
51+
52+
|===
53+
2554

2655
[[cypher-deprecations-additions-removals-2025.10]]
2756
== Neo4j 2025.10

modules/ROOT/pages/functions/index.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,38 @@ Further details and examples of lists may be found in xref::values-and-types/lis
128128

129129
| Function | Signature | Description
130130

131+
1.1+| xref::functions/list.adoc#functions-coll-distinct[`coll.distinct()`]
132+
| `coll.distinct(list :: LIST<ANY>) :: LIST<ANY>`
133+
| Returns the given list with all duplicate values removed.
134+
135+
1.1+| xref::functions/list.adoc#functions-coll-flatten[`coll.flatten()`]
136+
| `coll.flatten(list :: LIST<ANY>, depth = 1 :: INTEGER) :: LIST<ANY>`
137+
| Returns a list flattened to the given depth.
138+
139+
1.1+| xref::functions/list.adoc#functions-coll-indexOf[`coll.indexOf()`]
140+
| `coll.indexOf(list :: LIST<ANY>, value :: ANY) :: INTEGER`
141+
| Returns the index of the first match of value in the given list, if the value is no present, -1 is returned.
142+
143+
1.1+| xref::functions/list.adoc#functions-coll-insert[`coll.insert()`]
144+
| `coll.insert(list :: LIST<ANY>, index :: INTEGER, value :: ANY) :: LIST<ANY>`
145+
| Returns a list with the given value inserted at the given index.
146+
147+
1.1+| xref::functions/list.adoc#functions-coll-max[`coll.max()`]
148+
| `coll.max(list :: LIST<ANY>) :: ANY`
149+
| Returns the largest value.
150+
151+
1.1+| xref::functions/list.adoc#functions-coll-min[`coll.min()`]
152+
| `coll.min(list :: LIST<ANY>) :: ANY`
153+
| Returns the smallest value.
154+
155+
1.1+| xref::functions/list.adoc#functions-coll-remove[`coll.remove()`]
156+
| `coll.remove(list :: LIST<ANY>, index :: INTEGER) :: LIST<ANY>`
157+
| Returns a list with the value at the given index removed.
158+
159+
1.1+| xref::functions/list.adoc#functions-coll-sort[`coll.sort()`]
160+
| `coll.sort(list :: LIST<ANY>) :: LIST<ANY>`
161+
| Returns a sorted list.
162+
131163
1.1+| xref::functions/list.adoc#functions-keys[`keys()`]
132164
| `keys(input :: NODE \| RELATIONSHIP \| MAP) :: LIST<STRING>`
133165
| Returns a `LIST<STRING>` containing the `STRING` representations for all the property names of a `MAP`, `NODE`, or `RELATIONSHIP`.

0 commit comments

Comments
 (0)