Skip to content

Commit ed65321

Browse files
Add tips about Cypher 25 features to Cypher 5 manual (#1305)
This PR will fail until #1323 is merged. --------- Co-authored-by: Richard Sill <[email protected]>
1 parent 8b7d3d1 commit ed65321

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

modules/ROOT/pages/clauses/with.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[`C
202202
== Bind values to variables
203203

204204
`WITH` can be used to assign the values of expressions to variables.
205+
206+
[TIP]
207+
Cypher 25 introduces the `LET` clause which binds variables to expression results and can allow for a more succinct and readable alternative to `WITH`.
208+
For more information, see the link:https://neo4j.com/docs/cypher-manual/25/clauses/let/[Cypher 25 Manual -> `LET`].
209+
205210
In the below query, the value of the `STRING` concatenation expression is bound to a new variable `customerFullName`, and the value from the expression `chocolate.price * (1 - customer.discount)` is bound to `chocolateNetPrice`, both of which are then available in the `RETURN` clause.
206211

207212
.Bind values to variables
@@ -466,6 +471,11 @@ RETURN p.name AS product,
466471
`WITH` can be followed by the xref:clauses/where.adoc[`WHERE`] subclause to filter results.
467472
Similar to the subclauses used for xref:clauses/with.adoc#ordering-pagination[ordering and pagination], `WHERE` should be understood as part of the result manipulation performed by `WITH` -- not as a standalone clause -- before the results are passed on to subsequent clauses.
468473

474+
[TIP]
475+
Cypher 25 introduces the `FILTER` clause to filter queries.
476+
`FILTER` can be used as a more concise substitute for `WITH * WHERE <predicate>` constructs.
477+
For more information, see the link:https://neo4j.com/docs/cypher-manual/25/clauses/filter/[Cypher 25 Manual -> `FILTER`].
478+
469479
.Filter using `WITH` and `WHERE`
470480
[source, cypher]
471481
----
@@ -520,6 +530,11 @@ RETURN s.name AS supplier,
520530

521531
If a write clause is followed by a read clause, `WITH` must be used as a separator between the two.
522532

533+
[TIP]
534+
Cypher 25 removes the need to use `WITH` as a separator between write and read clauses.
535+
For more information, see link:https://neo4j.com/docs/cypher-manual/25/clauses/with/[Cypher 25 Manual -> `WITH`].
536+
537+
523538
.`WITH` used as a separator between a write clause and a read clause
524539
// tag::clauses_with_combine_write_read[]
525540
[source, cypher]

modules/ROOT/pages/introduction/index.adoc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@ ifndef::backend-pdf[]
77
:description: This section provides an introduction to the Cypher query language.
88
endif::[]
99

10-
Welcome to the Neo4j Cypher Manual.
10+
Welcome to the Neo4j Cypher Manual.
1111

12-
Cypher is Neo4j’s declarative query language, allowing users to unlock the full potential of property graph databases.
12+
Cypher is Neo4j’s declarative query language, allowing users to unlock the full potential of property graph databases.
1313

14-
The Cypher Manual aims to be as instructive as possible to readers from a variety of backgrounds and professions, such as developers, administrators, and academic researchers.
14+
[NOTE]
15+
====
16+
This manual covers Cypher 5 -- the default language for Neo4j databases.
17+
As of Neo4j 2025.06, Cypher 5 is in a frozen state; no new features will be added to it (though performance improvements and bug fixes may still be made).
18+
From Neo4j 2025.06 onward, all new Cypher features will be exclusively added to Cypher 25.
19+
For more details, see:
1520
16-
If you are new to Cypher and Neo4j, you can visit the link:{neo4j-docs-base-uri}/getting-started/current/cypher-intro/[Getting Started Guide -> Introduction to Cypher] chapter.
21+
* xref:queries/select-version.adoc[Select Cypher version]
22+
* link:https://neo4j.com/docs/cypher-manual/25/introduction/[Cypher 25 Manual]
23+
* link:https://neo4j.com/docs/cypher-manual/25/deprecations-additions-removals-compatibility/[Additions, deprecations, removals, and compatibility]
24+
====
25+
26+
The Cypher Manual aims to be as instructive as possible to readers from a variety of backgrounds and professions, such as developers, administrators, and academic researchers.
27+
28+
If you are new to Cypher and Neo4j, you can visit the link:{neo4j-docs-base-uri}/getting-started/current/cypher-intro/[Getting Started Guide -> Introduction to Cypher] chapter.
1729
Additionally, https://graphacademy.neo4j.com/[Neo4j GraphAcademy] has a variety of free courses tailored for all levels of experience.
1830

1931
For a reference of all available Cypher features, see the link:{neo4j-docs-base-uri}/cypher-cheat-sheet/current/[Cypher Cheat Sheet].

modules/ROOT/pages/patterns/index.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@ This chapter includes the following sections:
2828
* xref:patterns/non-linear-patterns.adoc[] - information about equijoins and graph patterns (combined path patterns).
2929
* xref:patterns/reference.adoc[] - a reference for looking up the syntax and semantics of graph pattern matching.
3030
31+
[TIP]
32+
Cypher 25 introduces the ability to specify different match modes.
33+
For more information, see the link:https://neo4j.com/docs/cypher-manual/25/patterns/match-modes/[Cypher 25 Manual -> Match modes].
34+
35+
3136
The model data in the examples used in this chapter are based on the UK national rail network, using https://www.raildeliverygroup.com/our-services/rail-data/fares-timetable-data.html[publicly available datasets].
3237

modules/ROOT/pages/queries/index.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@ It also explains how to select the version of Cypher in which queries are run, a
77
* xref:queries/concepts.adoc[]
88
* xref:queries/basic.adoc[]
99
* xref:queries/select-version.adoc[]
10-
* xref:queries/combined-queries.adoc[]
10+
* xref:queries/combined-queries.adoc[]
11+
12+
[TIP]
13+
====
14+
Cypher 25 introduces conditional and sequential queries.
15+
For more information, see the following pages in the Cypher 25 Manual:
16+
17+
* link:https://neo4j.com/docs/cypher-manual/25/queries/composed-queries/conditional-queries/[Conditional queries (`WHEN`)]
18+
* link:https://neo4j.com/docs/cypher-manual/25/queries/composed-queries/sequential-queries/[Sequential queries (`NEXT`)]
19+
====

0 commit comments

Comments
 (0)