You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The xref:functions/predicate.adoc#functions-all[`all()`] function matches nodes that have all the specified labels.
538
-
539
-
If passing a `LIST<STRING>` to an `all()` function evaluating a relationship pattern using dynamic relationship types, the list cannot contain more than one element.
540
-
This is because a relationship can only have exactly one type.
541
-
542
-
.Attempting to match relationship patterns using more than one relationship type will not return any results
543
-
[source, cypher]
544
-
----
545
-
MATCH ()-[r:$all(["ACTED_IN", "DIRECTED"])]->()
546
-
RETURN r
547
-
----
548
-
549
-
.Warning
550
-
[source, warning]
551
-
----
552
-
Warning: The query contains a relationship type expression that cannot be satisfied.
553
-
----
554
-
555
541
.Match nodes dynamically using the `any()` function
556
542
[source, cypher]
557
543
----
558
-
MATCH (n:$any(["Movie", "Person"]))-[:ACTED_IN|DIRECTED]->(m:Movie)
559
-
RETURN labels(n) AS labels, n.name AS person, collect(m.title) AS movies
544
+
MATCH (n:$any(["Movie", "Actor"]))
545
+
RETURN n as nodes
560
546
----
561
547
562
548
[NOTE]
563
549
The xref:functions/predicate.adoc#functions-any[`any()`] function matches nodes that have any of the specified labels.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,17 +85,20 @@ label:functionality[]
85
85
label:new[]
86
86
[source, cypher, role="noheader"]
87
87
----
88
-
MATCH (movie:$($label))
88
+
MATCH (movie:$($label)),
89
+
()-[r:$($type))]->()
89
90
----
90
91
91
92
[source, cypher, role="noheader"]
92
93
----
93
-
CREATE (movie:$($label))
94
+
CREATE (movie:$($label)),
95
+
()-[r:$($type)]->()
94
96
----
95
97
96
98
[source, cypher, role="noheader"]
97
99
----
98
-
MERGE (movie:$($label))
100
+
MERGE (movie:$($label)),
101
+
()-[r:$($type)]->()
99
102
----
100
103
101
104
[source, cypher, role="noheader"]
@@ -104,7 +107,7 @@ LOAD CSV WITH HEADERS FROM 'file:///artists-with-headers.csv' AS line
104
107
CREATE (n:$(line.label) {name: line.Name})
105
108
----
106
109
107
-
| Added the ability reference node labels and relationship types in xref:clauses/match.adoc#dynamic-match[`MATCH`], xref:clauses/create.adoc#dynamic-create[`CREATE`], and xref:clauses/merge.adoc#dynamic-merge[`MERGE`] clauses.
110
+
| Added the ability to dynamically reference node labels and relationship types in xref:clauses/match.adoc#dynamic-match[`MATCH`], xref:clauses/create.adoc#dynamic-create[`CREATE`], and xref:clauses/merge.adoc#dynamic-merge[`MERGE`] clauses.
108
111
Also introduced the ability to specify CSV columns dynamically when using xref:clauses/load-csv.adoc#dynamic-load[`LOAD CSV`].
0 commit comments