-
Notifications
You must be signed in to change notification settings - Fork 35
Added superfluous optional notification #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3544,6 +3544,161 @@ RETURN * | |
| ====== | ||
| ===== | ||
|
|
||
| [#_neo_clientnotification_statement_redundantoptionalprocedure] | ||
| === Redundant optional procedure | ||
|
|
||
| .Notification details | ||
| [cols="<1s,<4"] | ||
| |=== | ||
| |Neo4j code | ||
| m|Neo.ClientNotification.Statement.RedundantOptionalProcedure | ||
| |Title | ||
| a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure. | ||
| |Description | ||
| |The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. | ||
| |Category | ||
| m|GENERIC | ||
| |GQLSTATUS code | ||
| m|03N61 | ||
| |Status description | ||
| a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. | ||
JoelBergstrand marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| |Classification | ||
| m|GENERIC | ||
| |SeverityLevel | ||
| m|INFORMATION | ||
| |=== | ||
|
|
||
renetapopova marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| .Redundant use of `OPTIONAL` in a procedure call | ||
| [.tabbed-example] | ||
| ===== | ||
| [.include-with-neo4j-code] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You must also add a tab example for the GQLSTATUS code, similar to the rest of the notifications. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I've misunderstood the format. I'm pushing some changes to align with the rest of the notifications. I'll make sure that the notifications in the monorepo correspond to what is written here, in substance and formatting. |
||
| ====== | ||
| Query:: | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| OPTIONAL CALL db.createLabel("A") | ||
| ---- | ||
|
|
||
| Description of the returned code:: | ||
| The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. | ||
|
|
||
| Suggestions for improvement:: | ||
| If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| CALL db.createLabel("A") | ||
| ---- | ||
| ====== | ||
| [.include-with-GQLSTATUS-code] | ||
| ====== | ||
| Query:: | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| OPTIONAL CALL db.createLabel("A") | ||
| ---- | ||
| Returned GQLSTATUS code:: | ||
| 03N61 | ||
|
|
||
| Returned status description:: | ||
| info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. | ||
|
|
||
| Suggestions for improvement:: | ||
| If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| CALL db.createLabel("A") | ||
| ---- | ||
| ====== | ||
| ===== | ||
|
|
||
| [#_neo_clientnotification_statement_redundantoptionalsubquery] | ||
| === Redundant optional subquery | ||
|
|
||
| .Notification details | ||
| [cols="<1s,<4"] | ||
| |=== | ||
| |Neo4j code | ||
| m|Neo.ClientNotification.Statement.RedundantOptionalSubquery | ||
| |Title | ||
| a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery. | ||
| |Description | ||
| |The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. | ||
| |Category | ||
| m|GENERIC | ||
| |GQLSTATUS code | ||
| m|03N62 | ||
| |Status description | ||
| a|info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. | ||
| |Classification | ||
| m|GENERIC | ||
| |SeverityLevel | ||
| m|INFORMATION | ||
| |=== | ||
|
|
||
| .Redundant use of `OPTIONAL` in a `CALL` subquery | ||
| [.tabbed-example] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one also needs a tab example for the GQLSTATUS code, similar to the rest of the notifications. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I've misunderstood the format. I'm pushing some changes to align with the rest of the notifications. I'll make sure that the notifications in the monorepo correspond to what is written here, in substance and formatting. |
||
| ===== | ||
| [.include-with-neo4j-code] | ||
| ====== | ||
| Query:: | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| UNWIND [1, 2, 3] AS x | ||
| OPTIONAL CALL (x) { | ||
| CREATE({i:x}) | ||
| } | ||
| ---- | ||
|
|
||
| Description of the returned code:: | ||
| Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Is this description the same as defined in the monorepo? I couldn't find it in the code. |
||
|
|
||
| Suggestions for improvement:: | ||
| 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. | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| UNWIND [1, 2, 3] AS x | ||
| CALL (x) { | ||
| CREATE({i:x}) | ||
| } | ||
| ---- | ||
| ====== | ||
| [.include-with-GQLSTATUS-code] | ||
| ====== | ||
| Query:: | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| UNWIND [1, 2, 3] AS x | ||
| OPTIONAL CALL (x) { | ||
| CREATE({i:x}) | ||
| } | ||
| ---- | ||
|
|
||
| Returned GQLSTATUS code:: | ||
| 03N62 | ||
|
|
||
| Description of the returned code:: | ||
| info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. | ||
|
|
||
| Suggestions for improvement:: | ||
| 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. | ||
| + | ||
| [source,cypher] | ||
| ---- | ||
| UNWIND [1, 2, 3] AS x | ||
| CALL (x) { | ||
| CREATE({i:x}) | ||
| } | ||
| ---- | ||
| ====== | ||
| ===== | ||
|
|
||
| [#_neo_clientnotification_statement_parameternotprovided] | ||
| === Parameter missing | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.