Skip to content

Commit 82baf82

Browse files
authored
Side effect implication notification (#85)
1 parent c232a1a commit 82baf82

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

modules/ROOT/pages/changelogs.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[source, status codes, role="noheader"]
99
-----
1010
Neo.ClientNotification.Cluster.NoDatabasesReallocated
11+
Neo.ClientNotification.Statement.SideEffectVisibility
1112
-----
1213

1314
== Neo4j 5.13

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,54 @@ The product's default behavior of using a cost-based IDP search algorithm when c
923923
For more information, see link:https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/#cypher-planner[Cypher manual -> Cypher planner].
924924
====
925925

926+
[#_neo_clientnotification_statement_sideeffectvisibility]
927+
=== SideEffectVisibility
928+
929+
.Notification details
930+
[cols="<1s,<4"]
931+
|===
932+
|Code
933+
m|Neo.ClientNotification.Statement.SideEffectVisibility
934+
|Title
935+
a| A subquery expression within a mutating statement has implications for its side-effect visibility.
936+
|Severity
937+
m|WARNING
938+
|Category
939+
m|DEPRECATION
940+
|===
941+
942+
.Subquery expression within a mutating statement
943+
====
944+
Query::
945+
+
946+
[source,cypher]
947+
----
948+
CREATE ( { prop : COUNT { () } } )
949+
----
950+
951+
Description of the returned code::
952+
The semantics of this statement may change in later versions.
953+
954+
Suggestions for improvement::
955+
Extract the subquery expression into a preceding `WITH`:
956+
+
957+
[source,cypher]
958+
----
959+
WITH COUNT {()} AS i
960+
CREATE ( { prop : i } )
961+
----
962+
963+
and potentially wrap the mutating statement into a `CALL` subquery if changes from previous executions should be observable:
964+
965+
[source,cypher]
966+
----
967+
CALL{
968+
WITH COUNT {()} AS i
969+
CREATE ( { prop : i } )
970+
}
971+
----
972+
====
973+
926974
[#_neo_clientnotification_request_deprecatedformat]
927975
=== DeprecatedFormat
928976

0 commit comments

Comments
 (0)