You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC1.adoc
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
= 22NC1
2
2
3
3
== Status description
4
-
The graph type element includes a property key with name `{ <<propKey>> }` more than once.
4
+
error: data exception - graph type element contains duplicated tokens. The graph type element includes a property key with name `{ <<propKey>> }` more than once.
5
5
6
6
== Explanation
7
-
When defining a graph type, node element types, and relationship element types may only define a property once.
7
+
When defining a graph type, node and relationship element types may only define a property once.
8
8
9
9
== Example scenario
10
-
For example, try to set a graph type with :
10
+
For example, try to set a graph type as follows:
11
11
12
12
[source,cypher]
13
13
----
@@ -16,13 +16,22 @@ ALTER CURRENT GRAPH TYPE SET {
16
16
}
17
17
----
18
18
19
-
An error will be thrown with GQLSTATUS 22NC1 and the status description:
19
+
The query returns an error with GQLSTATUS 22NC1 and the status description:
20
20
21
21
[source]
22
22
----
23
23
error: data exception - graph type element contains duplicated tokens. The graph type element includes a property key with name `prop` more than once.
24
24
----
25
25
26
+
To fix this, remove the duplicate property key definition or uniquely name the property keys:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC2.adoc
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,13 @@
1
1
= 22NC2
2
2
3
3
== Status description
4
-
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 has no effect. The node element type `{ <<label>> }` must contain one or more implied labels, or at least one property type.
5
5
6
6
== Explanation
7
-
When defining a graph type, node element types have some effect.
8
-
Ineffectual node element types are not permitted.
7
+
When defining a graph type, node element types must have some effect; otherwise, they are not allowed.
9
8
10
9
== Example scenario
11
-
For example, try to set a graph type with :
10
+
For example, try to set a graph type as follows:
12
11
13
12
[source,cypher]
14
13
----
@@ -17,11 +16,20 @@ ALTER CURRENT GRAPH TYPE SET {
17
16
}
18
17
----
19
18
20
-
An error will be thrown with GQLSTATUS 22NC2 and the status description:
19
+
The query returns an error with GQLSTATUS 22NC2 and the status description:
21
20
22
21
[source]
23
22
----
24
-
error: data exception - node element type is empty. The node element type `Node` must contain one or more implied labels, or define at least one property type.
23
+
error: data exception - node element type is has no effect. The node element type `Node` must contain one or more implied labels, or at least one property type.
24
+
----
25
+
26
+
To fix this, define at least one property type or add an implied label, for example:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC3.adoc
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,40 @@
1
1
= 22NC3
2
2
3
3
== Status description
4
-
The relationship element type `{ <<relType>> }` must define a node element type for source or destination, or define at least one property type.
4
+
error: data exception - relationship element type has no effect. The relationship element type `{ <<relType>> }` must define a source, destination, or at least one property type.
5
5
6
6
== Explanation
7
7
When defining a graph type, relationship element types must have some effect.
8
-
Ineffectual relationship element types are not permitted.
8
+
To be effective, a relationship element type must define at least one of the following:
9
+
10
+
* a source node element type or label
11
+
* a destination node element type or label
12
+
* at least one property type
9
13
10
14
== Example scenario
11
-
For example, try to set a graph type with :
15
+
For example, try to set a graph type as follows:
12
16
13
17
[source,cypher]
14
18
----
15
19
ALTER CURRENT GRAPH TYPE SET {
16
-
()-[:REL =>]-()
20
+
()-[:REL =>]->()
17
21
}
18
22
----
19
23
20
-
An error will be thrown with GQLSTATUS 22NC3 and the status description:
24
+
The query returns an error with GQLSTATUS 22NC3 and the status description:
21
25
22
26
[source]
23
27
----
24
-
error: data exception - relationship element type is empty. The relationship element type `REL` must define a node element type for source or destination, or define at least one property type.
28
+
error: data exception - relationship element type has no effect. The relationship element type `REL` must define a source or destination, or at least one property type.
29
+
----
30
+
31
+
To fix this, define at least one property type or add a node element type, for example:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC4.adoc
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
= 22NC4
2
2
3
3
== Status description
4
-
The label(s) `{ <<labelList>> }` are defined as both identifying and implied.
4
+
error: data exception - a label cannot be both identifying and implied. The label(s) `{ <<labelList>> }` are defined as both identifying and implied.
5
5
6
6
== Explanation
7
7
When defining a graph type, labels and relationships must be assigned clear roles.
8
-
A label cannot be both "identifying" (used to uniquely identify nodes) and "implied" (automatically assigned based on other schema rules) at the same time.
8
+
A label cannot be both "identifying" (to uniquely identify nodes) and "implied" (automatically assigned based on other schema rules) at the same time.
9
9
Attempting to define a label as both will result in this error, as it creates ambiguity in the schema definition and node identification process.
10
10
11
11
== Example scenario
12
-
For example, try to set a graph type which defines the node element types 'Person and 'Student' with the label 'Person' also declared as an implied label on the 'Student' node element type:
12
+
For example, try to set a graph type which defines the node element types `Person` and `Student` with the label `Person` also declared as an implied label on the `Student` node element type as follows:
13
13
14
14
[source,cypher]
15
15
----
@@ -19,11 +19,22 @@ ALTER CURRENT GRAPH TYPE SET {
19
19
}
20
20
----
21
21
22
-
An error will be thrown with GQLSTATUS 22NC4 and the status description:
22
+
The query returns an error with GQLSTATUS 22NC4 and the status description:
23
23
24
24
[source]
25
25
----
26
-
error: data exception - a label cannot both identifying and implied. The label(s) `Person` are defined as both identifying and implied.
26
+
error: data exception - a label cannot be both identifying and implied. The label(s) `Person` are defined as both identifying and implied.
27
+
----
28
+
29
+
One way to fix this is to add another label to both nodes and capture the property type on `name` there:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC5.adoc
+50-11Lines changed: 50 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
= 22NC5
2
2
3
3
== Status description
4
-
The `{ <<entityType>> }` element type referenced by `{ <<graphTypeReference>> }` was not found.
4
+
error: data exception - graph type element not found. The `{ <<entityType>> }` element type referenced by `{ <<graphTypeReference>> }` does not exist.
5
5
6
6
== Explanation
7
7
This error occurs when a graph type definition references an element type (such as a node or relationship) using an alias that has not been defined, or by an identifying reference where there is no graph type element identified by that reference.
8
-
If the referenced node or relationship type does not exist, the operation cannot proceed and this error is returned to indicate the missing element.
8
+
If the referenced node or relationship type does not exist, the operation cannot proceed and will return an error to indicate the missing element.
9
9
10
10
== Example scenarios
11
11
12
-
=== Node element reference not found ===
13
-
For example, try to set a graph type with an identiying node element reference that does not exist:
12
+
=== Node element reference does not exist
13
+
For example, try to set a graph type with an identifying node element reference that does not exist as follows:
14
14
15
15
[source,cypher]
16
16
----
@@ -19,16 +19,23 @@ ALTER CURRENT GRAPH TYPE SET {
19
19
}
20
20
----
21
21
22
-
An error will be thrown with GQLSTATUS 22NC5 and the status description:
22
+
The query returns an error with GQLSTATUS 22NC5 and the status description:
23
23
24
24
[source]
25
25
----
26
-
error: data exception - graph type element not found. The node type element referenced by '(:Node =>)' was not found.
26
+
error: data exception - graph type element not found. The node type element referenced by '(:Node =>)' does not exist.
27
27
----
28
-
In this case, the reference could be corrected to be non-identifying, or the node type element could be defined before this operation.
28
+
In this case, you can make the reference non-identifying, or you can define the node type element before this operation:
29
29
30
-
=== Relationship element reference not found ===
31
-
For example, try to set a graph type with a relationship element reference that does not exist:
30
+
[source,cypher]
31
+
----
32
+
ALTER CURRENT GRAPH TYPE SET {
33
+
(:Node)-[e:REL => { prop :: STRING }]->()
34
+
}
35
+
----
36
+
37
+
=== Relationship element reference does not exist
38
+
For example, try to set a graph type with a relationship element reference that does not exist as follows:
32
39
33
40
[source,cypher]
34
41
----
@@ -38,12 +45,44 @@ ALTER CURRENT GRAPH TYPE SET {
38
45
39
46
----
40
47
41
-
An error will be thrown with GQLSTATUS 22NC5 and the status description:
48
+
The query returns an error with GQLSTATUS 22NC5 and the status description:
42
49
43
50
[source]
44
51
----
45
-
error: data exception - graph type element not found. The relationship type element referenced by 'b' was not found.
52
+
error: data exception - graph type element not found. The relationship type element referenced by 'b' does not exist.
46
53
----
54
+
In this case, the reference could be fixed by providing a relationship type:
55
+
56
+
[source,cypher]
57
+
----
58
+
ALTER CURRENT GRAPH TYPE SET {
59
+
CONSTRAINT FOR ()-[b:REL]->() REQUIRE (b.prop) IS KEY
60
+
}
61
+
----
62
+
63
+
=== Element reference omitted from constraint definition
64
+
For example, try to define a constraint with an empty node element type reference, which is not allowed as follows:
65
+
66
+
[source,cypher]
67
+
----
68
+
ALTER CURRENT GRAPH TYPE SET {
69
+
CONSTRAINT FOR () REQUIRE n.prop IS UNIQUE
70
+
----
71
+
72
+
The query returns an error 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 does not exist.
77
+
----
78
+
In this case, the reference can be fixed by providing a label for the constraint:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC6.adoc
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,38 @@
1
1
= 22NC6
2
2
3
3
== Status description
4
-
The independent constraint `{ <<constrDescrOrName>> }`` was defined using the same label `{ <<label>> }` as a node type element.
4
+
error: data exception - independent constraint and node element type have the same label.
5
+
The independent constraint `{ <<constrDescrOrName>> }` is using the same label `{ <<label>> }` as a node element type.
5
6
6
7
== Explanation
7
-
This error occurs when a label is used both as an identifying label (defining a node type element) and as part of an independent constraint.
8
-
A label cannot serve as both an identifying label and be referenced in an independent constraint at the same time.
8
+
This error occurs when a label is used both as an identifying label (defining a node element type) and as part of an independent constraint.
9
+
A label cannot simultaneously serve as an identifying label and be referenced in an independent constraint.
9
10
10
11
== Example scenario
11
-
For example, try to set an existance constraint on a property for the label `:Person`` where `:Person` is also defined as an identifying label in the graph type:
12
+
For example, try to set a property existence constraint on a property for the label `:Person`, where `:Person` is also defined as an identifying label in the graph type as follows:
12
13
13
14
[source,cypher]
14
15
----
15
16
ALTER CURRENT GRAPH TYPE SET {
16
17
(p:Person => {name :: STRING}),
17
-
CONSTRAINT FOR (p:Person =>) REQUIRE p.name IS NOT NULL,
18
+
CONSTRAINT FOR (p:Person =>) REQUIRE p.name IS NOT NULL
18
19
}
19
20
----
20
21
21
-
An error will be thrown with GQLSTATUS 22NC6 and the status description:
22
+
The query returns an error with GQLSTATUS 22NC6 and the status description:
22
23
23
24
[source]
24
25
----
25
-
error: data exception - independent constraint defined on node type element label. The independent constraint '(:`Person` {`name`})' was defined using the same label `Person` as a node type element.
26
+
error: data exception - independent constraint and node element type have the same label. The independent constraint 'Constraint( type='NODE_PROPERTY_EXISTENCE', schema=(:`Person` {`name`}) )' is using the same label `Person` as a node element type.
27
+
----
28
+
29
+
To fix this, define the property existence constraint as part of the node element type:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NC7.adoc
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,38 @@
1
1
= 22NC7
2
2
3
3
== Status description
4
-
The independent constraint `{ <<constrDescrOrName>> }` was defined using the same relationship type `{ <<relType>> }` as a relationship type element.
4
+
error: data exception - independent constraint and relationship element type have the same relationship type.
5
+
The independent constraint `{ <<constrDescrOrName>> }` is using the same relationship type `{ <<relType>> }` as a relationship element type.
5
6
6
7
== Explanation
7
-
This error occurs when a relationship type is used both as an identifying relaionship type (defining a relationship type element) and as part of an independent constraint.
8
-
A label cannot serve as both an identifying label and be referenced in an independent constraint at the same time.
8
+
This error occurs when a relationship type is used both as an identifying relationship type (defining a relationship element type) and as part of an independent constraint.
9
+
A relationship type cannot simultaneously serve as an identifying relationship type and be referenced in an independent constraint.
9
10
10
11
== Example scenario
11
-
For example, try to set an existance constraint on a property for the relationship type `:REL`` where `:REL` is also defined as an identifying relationship type in the graph type:
12
+
For example, try to set a property type constraint on a property for the relationship type `:REL`, where `:REL` is also defined as an identifying relationship type in the graph type as follows:
12
13
13
14
[source,cypher]
14
15
----
15
16
ALTER CURRENT GRAPH TYPE SET {
16
-
()-[:REL => {name :: STRING}]->(),
17
-
CONSTRAINT FOR ()-[r:REL =>]->() REQUIRE r.name IS NOT NULL,
17
+
()-[:REL => {name :: ANY NOT NULL}]->(),
18
+
CONSTRAINT FOR ()-[r:REL =>]->() REQUIRE r.name IS :: STRING
18
19
}
19
20
----
20
21
21
-
An error will be thrown with GQLSTATUS 22NC7 and the status description:
22
+
The query returns an error with GQLSTATUS 22NC7 and the status description:
22
23
23
24
[source]
24
25
----
25
-
error: data exception - independent constraint defined on node type element label. The independent constraint '(:`Person` {`name`})' was defined using the same label `Person` as a node type element.
26
+
error: data exception - independent constraint and relationship element type have the same relationship type. The independent constraint 'Constraint( type='RELATIONSHIP_PROPERTY_TYPE', schema=()-[:`REL` {`name`}]-(), propertyType=STRING )' is using the same relationship type `REL` as a relationship element type.
27
+
----
28
+
29
+
To fix this, define the property type constraint as part of the relationship element type:
0 commit comments