Skip to content

Commit 0a45679

Browse files
committed
Add one additioanl example. update nav
1 parent c9ebd7a commit 0a45679

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

modules/ROOT/pages/errors/gql-errors/22NC2.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= 22NC2
22

33
== Status description
4-
error: data exception - node element type is ineffectual. The node element type `{ <<label>> }` must contain one or more implied labels, or define at least one property type.
4+
error: data exception - node element type is ineffectual. The node element type `{ <<label>> }` must contain one or more implied labels, or at least one property type.
55

66
== Explanation
77
When defining a graph type, node element types have some effect.
@@ -21,7 +21,7 @@ An error will be thrown with GQLSTATUS 22NC2 and the status description:
2121

2222
[source]
2323
----
24-
error: data exception - node element type is ineffectual. The node element type `Node` must contain one or more implied labels, or define at least one property type.
24+
error: data exception - node element type is ineffectual. The node element type `Node` must contain one or more implied labels, or at least one property type.
2525
----
2626

2727
This can be corrected by defining at least one property type or by adding an implied label e.g.:

modules/ROOT/pages/errors/gql-errors/22NC5.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,32 @@ In this case, the reference could be corrected by providing a relationship type:
5858
ALTER CURRENT GRAPH TYPE SET {
5959
CONSTRAINT FOR ()-[b:REL]->() REQUIRE (b.prop) IS KEY
6060
}
61+
----
62+
63+
=== Element reference ommitted from constraint definition ===
64+
In this example, a constraint is defined with an empty node element type reference, which is not allowed:
6165

66+
[source,cypher]
67+
----
68+
ALTER CURRENT GRAPH TYPE SET {
69+
CONSTRAINT FOR () REQUIRE n.prop IS UNIQUE
6270
----
6371

72+
An error will be thrown with GQLSTATUS 22NC5 and the status description:
73+
74+
[source]
75+
----
76+
error: data exception - graph type element not found. The node type element referenced by 'n' was not found.
77+
----
78+
In this case, the reference can be corrected by providing a Label for the constraint:
79+
80+
[source,cypher]
81+
----
82+
ALTER CURRENT GRAPH TYPE SET {
83+
CONSTRAINT FOR (n:Node) REQUIRE n.prop IS UNIQUE
84+
----
85+
86+
6487
ifndef::backend-pdf[]
6588
[discrete.glossary]
6689
== Glossary

modules/ROOT/pages/errors/gql-errors/22NC8.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= 22NC9
1+
= 22NC8
22

33
== Status description
44
error: data exception - graph type contains duplicated tokens. The graph type includes a label, relationship type or alias with name `{ <<token>> }` more than once

modules/ROOT/pages/errors/gql-errors/22NC9.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= 22NCA
1+
= 22NC9
22

33
== Status description
44
error: data exception - invalid element type constraints in graph type. A `{ <<entityType>> }` element type property `{ <<context>> }` constraint cannot be specified inline of a `{ <<entityType2>> }` element type

0 commit comments

Comments
 (0)