Skip to content

Commit

Permalink
Add GQL status to the UNRECOGNIZED category (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: Reneta Popova <[email protected]>
  • Loading branch information
NataliaIvakina and renetapopova authored Jun 28, 2024
1 parent 94c5638 commit 9973d2a
Showing 1 changed file with 225 additions and 21 deletions.
246 changes: 225 additions & 21 deletions modules/ROOT/pages/notifications/all-notifications.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,13 @@ A notification has the unrecognized category if the query or command mentions en
[#_neo_clientnotification_database_homedatabasenotfound]
=== HomeDatabaseNotFound

.Notification details
==== Notification details

[.tabbed-example]
=====
[.include-with-neo4j-code]
======

[cols="<1s,<4"]
|===
|Neo4j code
Expand All @@ -883,8 +889,31 @@ m|INFORMATION
m|UNRECOGNIZED
|===

.Set the `home` database to a database that does not yet exist.
====
======
[.include-with-GQLSTATUS-code]
======

[cols="<1s,<4"]
|===
|GQLSTATUS code
m|00N50
|StatusDescription
a|note: successful completion - home database not found. The database `$db` does not exist. Verify that the spelling is correct or create the database for the command to take effect.
|Severity
m|INFORMATION
|Classification
m|UNRECOGNIZED
|===
======
=====

==== Example of setting the `home` database to a database that does not yet exist

[.tabbed-example]
=====
[.include-with-neo4j-code]
======

Query::
+
[source,cypher]
Expand All @@ -897,14 +926,42 @@ The home database provided does not currently exist in the DBMS.
This command will not take effect until this database is created. (HOME DATABASE: `nonexistingdatabase`)

Suggestions for improvement::
Make sure the home database has not been misspelled.
Verify that the home database name is not misspelled.

====
======
[.include-with-GQLSTATUS-code]
======

Query::
+
[source,cypher]
----
CREATE USER linnea SET PASSWORD "password" SET HOME DATABASE Nej4
----

Returned GQLSTATUS code::
00N50

Returned Status Description::
note: successful completion - home database not found.
The database `Ne4j` does not exist.
Verify that the spelling is correct or create the database for the command to take effect.

Suggestions for improvement::
Verify that the home database name is not misspelled.
======
=====

[#_neo_clientnotification_statement_unknownlabelwarning]
=== UnknownLabelWarning

.Notification details
==== Notification details

[.tabbed-example]
=====
[.include-with-neo4j-code]
======

[cols="<1s,<4"]
|===
|Neo4j code
Expand All @@ -917,8 +974,31 @@ m|WARNING
m|UNRECOGNIZED
|===

.Match on a node with a label that does not exist in the database.
====
======
[.include-with-GQLSTATUS-code]
======

[cols="<1s,<4"]
|===
|GQLSTATUS code
m|01N50
|StatusDescription
a|warn: unknown label. The label `$label` does not exist. Verify that the spelling is correct.
|Severity
m|WARNING
|Classification
m|UNRECOGNIZED
|===
======
=====

==== Example of matching on a node with a label that does not exist in the database

[.tabbed-example]
=====
[.include-with-neo4j-code]
======

Query::
+
[source,cypher]
Expand All @@ -930,14 +1010,44 @@ Description of the returned code::
One of the labels in your query is not available in the database, make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing label name is: `Perso`)

Suggestions for improvement::
Make sure you didn't misspell the label. If nodes with the given label will be created in the future, then no change is needed.
Verify that the label is not misspelled.
If you plan to create nodes with that label in the future, then no change is needed.

====
======
[.include-with-GQLSTATUS-code]
======

Query::
+
[source,cypher]
----
MATCH (n:Perso) RETURN n
----

Returned GQLSTATUS code::
01N50

Returned Status Description::
warn: unknown label.
The label `Perso` does not exist.
Verify that the spelling is correct.

Suggestions for improvement::
Verify that the label is not misspelled.
If you plan to create nodes with that label in the future, no change is needed.
======
=====

[#_neo_clientnotification_statement_unknownrelationshiptypewarning]
=== UnknownRelationshipTypeWarning

.Notification details
==== Notification details

[.tabbed-example]
=====
[.include-with-neo4j-code]
======

[cols="<1s,<4"]
|===
|Neo4j code
Expand All @@ -950,8 +1060,30 @@ m|WARNING
m|UNRECOGNIZED
|===

.Match on a relationship, where there are no relationships in the database with the given relationship type.
====
======
[.include-with-GQLSTATUS-code]
======

[cols="<1s,<4"]
|===
|GQLSTATUS code
m|01N51
|StatusDescription
a|warn: unknown relationship type. The relationship type `$reltype` does not exist. Verify that the spelling is correct.
|Severity
m|WARNING
|Classification
m|UNRECOGNIZED
|===
======
=====

==== Example of matching on a relationship, when there are no relationships in the database with the given relationship type

[.tabbed-example]
=====
[.include-with-neo4j-code]
======
Query::
+
[source,cypher]
Expand All @@ -964,15 +1096,42 @@ One of the relationship types in your query is not available in the database,
make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing relationship type is: `NonExistingType`)

Suggestions for improvement::
Make sure you did not misspell the relationship type.
If relationships will be created, with the given relationship type, in the future, then no change to the query is needed.
Verify that the relationship type is not misspelled.
If you plan to create relationships of this type in the future, no change is needed.

====
======
[.include-with-GQLSTATUS-code]
======
Query::
+
[source,cypher]
----
MATCH (n)-[:NonExistingType]->() RETURN n
----

Returned GQLSTATUS code::
01N51

Returned Status Description::
warn: unknown relationship type.
The relationship type `NonExistingType` does not exist.
Verify that the spelling is correct.

Suggestions for improvement::
Verify that the relationship type is not misspelled.
If you plan to create relationships of this type in the future, no change is needed.
======
=====

[#_neo_clientnotification_statement_unknownpropertykeywarning]
=== UnknownPropertyKeyWarning

.Notification details
==== Notification details

[.tabbed-example]
=====
[.include-with-neo4j-code]
======
[cols="<1s,<4"]
|===
|Neo4j code
Expand All @@ -985,8 +1144,29 @@ m|WARNING
m|UNRECOGNIZED
|===

.Match on a property key that does not exist.
====
======
[.include-with-GQLSTATUS-code]
======
[cols="<1s,<4"]
|===
|GQLSTATUS code
m|01N52
|StatusDescription
a|warn: unknown property key. The property `$propkey` does not exist. Verify that the spelling is correct.
|Severity
m|WARNING
|Classification
m|UNRECOGNIZED
|===
======
=====

==== Example of matching on a property key that does not exist

[.tabbed-example]
=====
[.include-with-neo4j-code]
======
Query::
+
[source,cypher]
Expand All @@ -999,9 +1179,33 @@ One of the property names in your query is not available in the database,
make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing property name is: `nonExistingProp`)

Suggestions for improvement::
Make sure you didn't misspell the property key. If the property key will be created in the future, then no change is needed to the query.
Verify that the property key is not misspelled.
If you plan to create that property key in the future, no change is needed.

====
======
[.include-with-GQLSTATUS-code]
======
Query::
+
[source,cypher]
----
MATCH (n:Person {nme:”Tom”})
RETURN n
----

Returned GQLSTATUS code::
01N52

Returned Status Description::
warn: unknown property key.
The property `nme` does not exist.
Verify that the spelling is correct.

Suggestions for improvement::
Verify that the property key is not misspelled.
If you plan to create that property key in the future, no change is needed.
======
=====

[#_unsupported_notifications]
== `UNSUPPORTED` category
Expand Down

0 comments on commit 9973d2a

Please sign in to comment.