@@ -3700,6 +3700,161 @@ RETURN *
37003700======
37013701=====
37023702
3703+ [#_neo_clientnotification_statement_redundantoptionalprocedure]
3704+ === Redundant optional procedure
3705+
3706+ .Notification details
3707+ [cols="<1s,<4"]
3708+ |===
3709+ |Neo4j code
3710+ m|Neo.ClientNotification.Statement.RedundantOptionalProcedure
3711+ |Title
3712+ a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure.
3713+ |Description
3714+ |The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure.
3715+ |Category
3716+ m|GENERIC
3717+ |GQLSTATUS code
3718+ m|03N61
3719+ |Status description
3720+ a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure.
3721+ |Classification
3722+ m|GENERIC
3723+ |SeverityLevel
3724+ m|INFORMATION
3725+ |===
3726+
3727+ .Redundant use of `OPTIONAL` in a procedure call
3728+ [.tabbed-example]
3729+ =====
3730+ [.include-with-neo4j-code]
3731+ ======
3732+ Query::
3733+ +
3734+ [source,cypher]
3735+ ----
3736+ OPTIONAL CALL db.createLabel("A")
3737+ ----
3738+
3739+ Description of the returned code::
3740+ The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
3741+
3742+ Suggestions for improvement::
3743+ If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
3744+ +
3745+ [source,cypher]
3746+ ----
3747+ CALL db.createLabel("A")
3748+ ----
3749+ ======
3750+ [.include-with-GQLSTATUS-code]
3751+ ======
3752+ Query::
3753+ +
3754+ [source,cypher]
3755+ ----
3756+ OPTIONAL CALL db.createLabel("A")
3757+ ----
3758+ Returned GQLSTATUS code::
3759+ 03N61
3760+
3761+ Returned status description::
3762+ info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure.
3763+
3764+ Suggestions for improvement::
3765+ If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query.
3766+ +
3767+ [source,cypher]
3768+ ----
3769+ CALL db.createLabel("A")
3770+ ----
3771+ ======
3772+ =====
3773+
3774+ [#_neo_clientnotification_statement_redundantoptionalsubquery]
3775+ === Redundant optional subquery
3776+
3777+ .Notification details
3778+ [cols="<1s,<4"]
3779+ |===
3780+ |Neo4j code
3781+ m|Neo.ClientNotification.Statement.RedundantOptionalSubquery
3782+ |Title
3783+ a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery.
3784+ |Description
3785+ |The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3786+ |Category
3787+ m|GENERIC
3788+ |GQLSTATUS code
3789+ m|03N62
3790+ |Status description
3791+ a|info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3792+ |Classification
3793+ m|GENERIC
3794+ |SeverityLevel
3795+ m|INFORMATION
3796+ |===
3797+
3798+ .Redundant use of `OPTIONAL` in a `CALL` subquery
3799+ [.tabbed-example]
3800+ =====
3801+ [.include-with-neo4j-code]
3802+ ======
3803+ Query::
3804+ +
3805+ [source,cypher]
3806+ ----
3807+ UNWIND [1, 2, 3] AS x
3808+ OPTIONAL CALL (x) {
3809+ CREATE({i:x})
3810+ }
3811+ ----
3812+
3813+ Description of the returned code::
3814+ Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed.
3815+
3816+ Suggestions for improvement::
3817+ 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.
3818+ +
3819+ [source,cypher]
3820+ ----
3821+ UNWIND [1, 2, 3] AS x
3822+ CALL (x) {
3823+ CREATE({i:x})
3824+ }
3825+ ----
3826+ ======
3827+ [.include-with-GQLSTATUS-code]
3828+ ======
3829+ Query::
3830+ +
3831+ [source,cypher]
3832+ ----
3833+ UNWIND [1, 2, 3] AS x
3834+ OPTIONAL CALL (x) {
3835+ CREATE({i:x})
3836+ }
3837+ ----
3838+
3839+ Returned GQLSTATUS code::
3840+ 03N62
3841+
3842+ Description of the returned code::
3843+ info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery.
3844+
3845+ Suggestions for improvement::
3846+ 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.
3847+ +
3848+ [source,cypher]
3849+ ----
3850+ UNWIND [1, 2, 3] AS x
3851+ CALL (x) {
3852+ CREATE({i:x})
3853+ }
3854+ ----
3855+ ======
3856+ =====
3857+
37033858[#_neo_clientnotification_statement_parameternotprovided]
37043859=== Parameter missing
37053860
0 commit comments