Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5a98979
fix Cypher 25 queries (#1309)
JPryce-Aklundh Jun 18, 2025
742fc81
add xrefs for constraints index page (#1311)
JPryce-Aklundh Jun 18, 2025
9c57b8e
match modes and NEXT cheat sheet tags (#1310)
JPryce-Aklundh Jun 18, 2025
0e14511
List removed, deprecated, new options of the CREATE db cmd (#1312)
NataliaIvakina Jun 18, 2025
e509773
Add missing Cypher 25 updates (GQL extended identifiers + subqeury ex…
JPryce-Aklundh Jun 19, 2025
3a2dd81
Mark 25 as prerelease - force sitemap to Cypher 5 (#1316)
recrwplay Jun 23, 2025
caeeee4
Select Cypher version (#1123)
JPryce-Aklundh Jun 23, 2025
d14b25d
Bump the dev-dependencies group with 2 updates (#1318)
dependabot[bot] Jun 24, 2025
0c0caa3
Bump the prod-dependencies group with 5 updates (#1319)
dependabot[bot] Jun 24, 2025
6a05b2f
introduction note about Cypher 25 (#1320)
JPryce-Aklundh Jun 24, 2025
17d3ce3
update removals & deprecations for graph references (#1315)
nadja-muller Jun 24, 2025
dac419b
fix link
JPryce-Aklundh Jun 24, 2025
8cc167e
conditional query graph (#1322)
JPryce-Aklundh Jun 24, 2025
a712679
add cypher-5 to pr checks (#1324)
JPryce-Aklundh Jun 25, 2025
6814407
2025.07 antora update (#1326)
JPryce-Aklundh Jun 26, 2025
26933f2
Add language version control commands to Additions page (#1314)
JPryce-Aklundh Jun 27, 2025
854b3c3
Add cheat sheet tags for language version options (#1330)
JPryce-Aklundh Jun 27, 2025
3d3070d
minor fix to select version (#1331)
JPryce-Aklundh Jun 27, 2025
bd97e08
Fix last remaining broken links (#1332)
JPryce-Aklundh Jun 27, 2025
d3b1cef
Clause composition: Write-read conflicts (#1328)
WilcoNeo Jul 1, 2025
0e8aeab
Update Select Cypher versions guide with relevant links to Operations…
JPryce-Aklundh Jul 2, 2025
11b2004
Update links with their redirects URLs. (#1334)
stefano-ottolenghi Jul 4, 2025
ec5d804
Added note on NEXT limitations (#1338)
JoelBergstrand Jul 8, 2025
3ce0fcf
Include updates in NEXT limitations (#1341)
JoelBergstrand Jul 17, 2025
0697dbe
Update recommendations dataset URL.
stefano-ottolenghi Jul 21, 2025
1ccfc70
Add dynamic label and type support in label expressions (#1339)
gem-neo4j Jul 31, 2025
5574338
Name Repeat operator without Trail/Walk parameter (#1343)
arnefischereit Jul 31, 2025
891b20a
two merge conflicts
rsill-neo4j Jul 31, 2025
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
2 changes: 1 addition & 1 deletion antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ nav:
- modules/ROOT/content-nav.adoc
asciidoc:
attributes:
neo4j-version: '2025.06'
neo4j-version: '2025.07'
32 changes: 32 additions & 0 deletions modules/ROOT/pages/clauses/filter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,38 @@ RETURN p.name AS person,
3+|Rows: 2
|===

[[filter-on-dynamic-labels-and-types]]
== Filter on dynamic labels and types

To filter on a label or relationship type using a dynamically computed value, use `$(<expr>)` where <expr> is any Cypher expression:

.Parameters
[source, parameters]
----
{
"label": "Swedish"
}
----

.Filter on a dynamically computed node label
// tag::clauses_where_dynamic[]
[source, cypher]
----
MATCH (n)
FILTER n:$($label)
RETURN labels(n) AS labels
----
// end::clauses_where_dynamic[]

.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| labels
| ["Person", "Swedish"]
1+d|Rows: 1
|===


[[filter-on-dynamic-properties]]
== Filter on dynamic properties

Expand Down
32 changes: 32 additions & 0 deletions modules/ROOT/pages/clauses/where.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,38 @@ RETURN f.name AS oldFriend
|===


[[filter-on-dynamic-labels-and-types]]
== Filter on dynamic labels and types

To filter on a label or relationship type using a dynamically computed value, use `$(<expr>)` where <expr> is any Cypher expression:

.Parameters
[source, parameters]
----
{
"label": "Swedish"
}
----

.Filter on a dynamically computed node label
// tag::clauses_where_dynamic[]
[source, cypher]
----
MATCH (n)
WHERE n:$($label)
RETURN labels(n) AS labels
----
// end::clauses_where_dynamic[]

.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| labels
| ["Person", "Swedish"]
1+d|Rows: 1
|===


[[filter-on-dynamic-properties]]
== Filter on dynamic properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,31 @@ Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+
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.
For more information, see xref:queries/select-version.adoc[].

[[cypher-deprecations-additions-removals-2025.07]]
== Neo4j 2025.07

=== Updated in Cypher 25

[cols="2", options="header"]
|===
| Feature
| Details

a|
label:functionality[]
label:updated[]
[source, cypher, role="noheader"]
----
MATCH (n)-[r]->()
WHERE n:$(<expr1>)
WITH n, r:$(<expr2>) AS hasType
RETURN n:$(<expr3>)
----

| Added the ability to dynamically reference node labels and relationship types in places where xref:patterns/reference.adoc#label-expressions[label expressions] are allowed.
|===


[[cypher-deprecations-additions-removals-2025.06]]
== Neo4j 2025.06

Expand Down
13 changes: 13 additions & 0 deletions modules/ROOT/pages/patterns/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,19 @@ The following matches relationships that have a type that is neither `A` nor `B`
-[:!A&!B]->
----

[[dynamic-label-and-type-expressions]]
=== Dynamic label and type expressions

Node labels and relationship types can be referenced dynamically in expressions, parameters, and variables within label expressions.

.Syntax for creating nodes and relationships dynamically
[source, syntax]
----
dynamicLabelExpression ::= ":$(" + valueExpression ")"
----

The `valueExpression` must evaluate to a `STRING NOT NULL | LIST<STRING NOT NULL> NOT NULL` value.

[[property-key-value-expressions]]
== Property key-value expressions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The `id` column specifies a unique ID assigned to each operator.
There are no guarantees about the order of the ids, although they will usually start with 0 at the root operator, and will increase until the leaf operator is reached at the beginning of the operator tree.

The `Details` column in the middle of the execution plan describes what task is performed by each operator.
For example, the details column of the xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[Repeat(Trail)] operator in the middle of the execution plan (`id 5`), specifies that the operator traverses a quantified path pattern without an upward limit.
For example, the details column of the xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[Repeat] operator in the middle of the execution plan (`id 5`), specifies that the operator traverses a quantified path pattern without an upward limit.

Finally, the `Estimated Rows` column details the number of rows that are expected to be produced by each operator.
This estimate is an approximate number based on the available statistical information and the planner uses it to choose a suitable execution plan.footnote:[The statistical information maintained by Neo4j includes the following: the number of nodes having a certain label, the number of relationships by type, selectivity per index, and the number of relationships by type, ending with or starting from a node with a specific label.]
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/planning-and-tuning/operators/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ Tests for the presence of a pattern predicate in queries containing multiple pat
|

| xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-nullify-metadata[NullifyMetadata]
| responsible for cleaning up the state produced by xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[`Repeat(Trail)`].
It is only planned directly after `Repeat(Trail)`.
| responsible for cleaning up the state produced by xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[`Repeat`].
It is only planned directly after `Repeat`.
|
|
|
Expand Down Expand Up @@ -632,7 +632,7 @@ It also fetches the start and end nodes of those relationships.
|
|

| xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[Repeat(Trail)]
| xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[Repeat]
| Solves quantified path patterns.
|
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4063,15 +4063,15 @@ Total database accesses: 49, total allocated memory: 1200


[[query-plan-repeat]]
=== Repeat (Trail)
// Repeat(Trail)
=== Repeat
// Repeat

Given a start node, the `Repeat(Trail)` operator will traverse xref::patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path patterns] that cannot be solved (or solved efficiently) with the xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-varlength-expand-all[`VarLengthExpand(All)`] operator.
Given a start node, the `Repeat` operator will traverse xref::patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path patterns] that cannot be solved (or solved efficiently) with the xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-varlength-expand-all[`VarLengthExpand(All)`] operator.
Similar to an xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-apply[`Apply`] operator, it takes a single row from the left-hand side and applies the operators on the right-hand side.
In contrast to `Apply`, however, it repeatedly applies these operators in accordance with the quantifiers on the quantified path pattern.
In the following example, the operator will repeat twice and produce rows for both repetitions.

.Repeat(Trail)
.Repeat
======

.Query
Expand Down Expand Up @@ -4127,8 +4127,8 @@ Total database accesses: 747, total allocated memory: 45832
[[query-plan-nullify-metadata]]
=== Nullify Metadata

`NullifyMetadata` is responsible for cleaning up the state produced by xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[`Repeat(Trail)`].
It is only planned directly after `Repeat(Trail)`.
`NullifyMetadata` is responsible for cleaning up the state produced by xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-repeat[`Repeat`].
It is only planned directly after `Repeat`.

.NullifyMetadata
======
Expand Down
Loading