Skip to content

Commit e313b9e

Browse files
Gustav HedengranLinneaAnderssonrenetapopova
authored andcommitted
Add RepeatedRelationshipReference and provide example (#35)
- Add missing section for already existing notification code `RepeatedRelationshipReference`. - Add an example, which cover the only scenario for which the notification code is issued. --------- Co-authored-by: LinneaAndersson <[email protected]> Co-authored-by: Reneta Popova <[email protected]>
1 parent 1685dc9 commit e313b9e

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

modules/ROOT/pages/changelogs.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
:description: This page lists all changes to status codes per Neo4j version.
22
= Changes to status codes per Neo4j version
33

4+
== Neo4j 5.5
5+
6+
7+
**New:**
8+
9+
[source, status codes, role="noheader"]
10+
-----
11+
Neo.ClientNotification.Statement.RepeatedRelationshipReference
12+
-----
13+
414
== Neo4j 5.0
515

616
**New:**

modules/ROOT/pages/notifications/all-notifications.adoc

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,4 +1069,40 @@ a|The query used a procedure that generated a warning.
10691069
m|WARNING
10701070
|Category
10711071
m|GENERIC
1072-
|===
1072+
|===
1073+
1074+
[#_neo_clientnotification_statement_repeatedrelationshipreference]
1075+
=== Neo.ClientNotification.Statement.RepeatedRelationshipReference (when run on version 5.5 or newer)
1076+
1077+
.Notification category details
1078+
[cols="<1s,<4"]
1079+
|===
1080+
|Code
1081+
m|Neo.ClientNotification.Statement.RepeatedRelationshipReference
1082+
|Title
1083+
a|The query returns no results because a relationship variable is bound more than once.
1084+
|Severity
1085+
m|WARNING
1086+
|Category
1087+
m|GENERIC
1088+
|===
1089+
1090+
.Binding a relationship variable more than once.
1091+
====
1092+
Query::
1093+
+
1094+
[source,cypher]
1095+
----
1096+
MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r
1097+
----
1098+
Description of the returned code::
1099+
A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated)
1100+
1101+
Suggestions for improvement::
1102+
Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`:
1103+
+
1104+
[source, cypher, role="noplay"]
1105+
----
1106+
MATCH (:A)-[r]->(:B) RETURN r
1107+
----
1108+
====

0 commit comments

Comments
 (0)