@@ -3555,13 +3555,13 @@ m|Neo.ClientNotification.Statement.RedundantOptionalProcedure
35553555|Title
35563556a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure.
35573557|Description
3558- |The use of `OPTIONAL` is redundant as `CALL $ s` is a void procedure.
3558+ |The use of `OPTIONAL` is redundant as `CALL % s` is a void procedure.
35593559|Category
35603560m|GENERIC
3561- || GQLSTATUS code
3561+ |GQLSTATUS code
35623562m|03N61
35633563|Status description
3564- a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL $ s` is a void procedure.
3564+ a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL % s` is a void procedure.
35653565|Classification
35663566m|GENERIC
35673567|SeverityLevel
@@ -3581,7 +3581,29 @@ OPTIONAL CALL db.createLabel("A")
35813581----
35823582
35833583Description of the returned code::
3584- Optional is redundant in the case of void procedures. The use of `OPTIONAL` on void procedures have no effect and can be removed.
3584+ The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
3585+
3586+ Suggestions for improvement::
3587+ If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
3588+ +
3589+ [source,cypher]
3590+ ----
3591+ CALL db.createLabel("A")
3592+ ----
3593+ ======
3594+ [.include-with-GQLSTATUS-code]
3595+ ======
3596+ Query::
3597+ +
3598+ [source,cypher]
3599+ ----
3600+ OPTIONAL CALL db.createLabel("A")
3601+ ----
3602+ Returned GQLSTATUS code::
3603+ 03N61
3604+
3605+ Returned status description::
3606+ info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
35853607
35863608Suggestions for improvement::
35873609If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
@@ -3635,6 +3657,35 @@ OPTIONAL CALL (x) {
36353657Description of the returned code::
36363658Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed.
36373659
3660+ Suggestions for improvement::
3661+ If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query.
3662+ +
3663+ [source,cypher]
3664+ ----
3665+ UNWIND [1, 2, 3] AS x
3666+ CALL (x) {
3667+ CREATE({i:x})
3668+ }
3669+ ----
3670+ ======
3671+ [.include-with-GQLSTATUS-code]
3672+ ======
3673+ Query::
3674+ +
3675+ [source,cypher]
3676+ ----
3677+ UNWIND [1, 2, 3] AS x
3678+ OPTIONAL CALL (x) {
3679+ CREATE({i:x})
3680+ }
3681+ ----
3682+
3683+ Returned GQLSTATUS code::
3684+ 03N62
3685+
3686+ Description of the returned code::
3687+ info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3688+
36383689Suggestions for improvement::
36393690If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query.
36403691+
0 commit comments