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
Add example for new notification "Binding a variable-length relations… (#64)
Cherry-picked from #40
- Removing deprecation examples for "repeated variable length
relationship references" since they are being "undeprecated".
- Adding example `Binding a variable-length relationship variable more
than once` to demonstrate a new notification.
Build on top of #35.
Co-authored-by: Gustav Hedengran <[email protected]>
Copy file name to clipboardExpand all lines: modules/ROOT/pages/notifications/all-notifications.adoc
+14-66Lines changed: 14 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -686,68 +686,6 @@ m|WARNING
686
686
m|DEPRECATION
687
687
|===
688
688
689
-
.Repeated variable length relationship variable inside the same pattern, with same relationship type (when run on a 5.x release)
690
-
====
691
-
Query::
692
-
+
693
-
[source,cypher]
694
-
----
695
-
MATCH ()-[r:PARENT*]-()
696
-
MATCH ()-[r:PARENT*]-()
697
-
RETURN *
698
-
----
699
-
700
-
Description of the returned code::
701
-
Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: `r`)
702
-
703
-
Suggestions for improvement::
704
-
Inside a single pattern, we have relationship uniqueness, which means that this query never will return any rows and should therefore be rewritten to the wanted behavior.
705
-
706
-
====
707
-
708
-
.Repeated variable length relationship across patterns, with the same relationship type
709
-
====
710
-
Query::
711
-
+
712
-
[source,cypher]
713
-
----
714
-
MATCH ({name:"Molly"})-[r:KNOWS*]->({name:"Kalle"})
715
-
MATCH ({age:25})-[r:KNOWS*]->({age:21})
716
-
RETURN r
717
-
----
718
-
719
-
Description of the returned code::
720
-
Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: `r`)
721
-
722
-
Suggestions for improvement::
723
-
Since the relationships in the first and second match must be the same, we know that the start node and the end node are the same.
724
-
In the query above, we could therefore concatenate the predicates from the two matches and create a single match:
725
-
+
726
-
[source,cypher]
727
-
----
728
-
MATCH ({name:"Molly", age:25})-[r:KNOWS*]->({name:"Kalle", age:21})
729
-
RETURN r
730
-
----
731
-
====
732
-
733
-
.Repeated variable length relationship across patterns with different relationship types
734
-
====
735
-
Query::
736
-
+
737
-
[source,cypher]
738
-
----
739
-
MATCH ()-[r:PARENT*]-()
740
-
MATCH ()-[r:CHILD*]-()
741
-
RETURN *
742
-
----
743
-
744
-
Description of the returned code::
745
-
Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: `r`)
746
-
747
-
Suggestions for improvement::
748
-
Since the relationships in the first and second match must be the same, and a single relationship can't have multiple relationship types, this query will never return any rows.
749
-
====
750
-
751
689
.Colon after the | in a relationship pattern
752
690
====
753
691
Query::
@@ -1144,9 +1082,7 @@ Relationship type expression cannot possibly be satisfied. (`R1&R2` can never be
.Binding a relationship variable more than once (when run on version 5.5 or newer)
1165
1101
====
1166
1102
Query::
1167
1103
+
@@ -1180,3 +1116,15 @@ Use one pattern to match all relationships that start with a node with the label
1180
1116
MATCH (:A)-[r]->(:B) RETURN r
1181
1117
----
1182
1118
====
1119
+
1120
+
.Binding a variable-length relationship variable more than once (when run on version 5.6 or newer)
1121
+
====
1122
+
Query::
1123
+
+
1124
+
[source,cypher]
1125
+
----
1126
+
MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count
1127
+
----
1128
+
Description of the returned code::
1129
+
A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated)
0 commit comments