Skip to content

Commit 7ed4774

Browse files
committed
Review fixes
1 parent 1be1f7b commit 7ed4774

File tree

7 files changed

+41
-7
lines changed

7 files changed

+41
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= 22NCB
22

33
== Status description
4-
error: data exception - relationship element type already exists. A relationship element type identified by the relationship type `{ <<relType>> }` already exists in the graph type."
4+
error: data exception - relationship element type already exists. A relationship element type identified by the relationship type `{ <<relType>> }` already exists in the graph type.
55

66
== Explanation
77

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

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

33
== Status description
4-
error: data exception - node element type specified incorrectly. The node element type identified by the label `{ <<label>> }` is different to the one specified in the query.
4+
error: data exception - node element type specified incorrectly. The node element type `{ <<graphTypeElement>> }` identified by the label `{ <<label>> }` is different to the one specified in the query `{ <<graphTypeElement>> }`.
55

66
== Explanation
77

@@ -28,7 +28,7 @@ The query returns an error with GQLSTATUS 22NCC and the status description:
2828

2929
[source]
3030
----
31-
error: data exception - node element type specified incorrectly. The node element type identified by the label `Person` is different to the one specified in the query.
31+
error: data exception - node element type specified incorrectly. The node element type (`p`:`Person` => {`name` :: STRING }) identified by the label `Person` is different to the one specified in the query (`p`:`Person` => :`Student`).
3232
----
3333

3434
To fix this, change the query as follows:

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

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

33
== Status description
4-
error: data exception - relationship element type specified incorrectly. The relationship element type identified by the relationship type `{ <<relType>> }` is different to the one specified in the query.
4+
error: data exception - relationship element type specified incorrectly. The relationship element type `{ <<graphTypeElement>> }` identified by the relationship type `{ <<relType>> }` is different to the one specified in the query `{ <<graphTypeElement>> }`.
55

66
== Explanation
77

@@ -27,7 +27,7 @@ The query returns an error with GQLSTATUS 22NCD and the status description:
2727

2828
[source]
2929
----
30-
error: data exception - relationship element type specified incorrectly. The relationship element type identified by the relationship type `REL` is different to the one specified in the query.
30+
error: data exception - relationship element type specified incorrectly. The relationship element type ()-[r:`REL` => {`name` :: STRING }]->() identified by the relationship type `REL` is different to the one specified in the query ()-[`r`:`REL` => {`name` :: STRING, `age` :: INT }]->().
3131
----
3232

3333
To fix this, change the query as follows:

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

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

33
== Status description
4-
error: data exception - node element type in use. The node element type identified by the label `{ <<label>> }` is referenced in the graph type element '{ <<graphTypeReference>> }' and cannot be dropped.
4+
error: data exception - node element type in use. The node element type identified by the label `{ <<label>> }` is referenced in the graph type element `{ <<graphTypeReference>> }` and cannot be dropped.
55

66
== Explanation
77

@@ -31,10 +31,14 @@ The query returns an error with GQLSTATUS 22NCE and the status description:
3131
error: data exception - node element type in use. The node element type identified by the label `Car` is referenced in the graph type element '()-[:`DRIVES` =>]->()' and cannot be dropped.
3232
----
3333

34-
To fix this, change the query as follows:
34+
To fix this and drop both types, change the query as follows:
3535

3636
[source, cypher]
3737
----
38+
ALTER CURRENT GRAPH TYPE DROP {
39+
(:Person => ),
40+
()-[:DRIVES]->()
41+
}
3842
3943
----
4044

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
error: data exception - graph type constraint not supported. Graph type constraint definitions are not supported in the `{ <<graphTypeOperation>> }` operation.
55

66
== Explanation
7+
This error occurs when an attempt is made to specify a graph type constraint using the DROP or AMEND operations, which does not support such operations.
8+
Graph type constraints my only be dropped by name when using the DROP operation, and are completely invalid when using AMEND.
9+
This also applies to graph type constraints defined inline of the graph type elements using `IS KEY` and `IS UNIQUE`
710

811
== Example scenario
912

@@ -42,6 +45,7 @@ To fix this, change the query as follows:
4245
ALTER CURRENT GRAPH TYPE DROP {
4346
CONSTRAINT c1
4447
}
48+
4549
ALTER CURRENT GRAPH TYPE ADD {
4650
CONSTRAINT c1 FOR (s:Student) REQUIRE s.studentId :: STRING
4751
}

modules/ROOT/pages/errors/gql-errors/index.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,31 @@ Status description:: error: data exception - graph type contains duplicated toke
671671

672672
Status description:: error: data exception - invalid element type constraints in graph type. A `{ <<entityType>>1 }` element type property `{ <<context>> }` constraint cannot be specified inline of a `{ <<entityType>>2 }` element type.
673673

674+
=== xref:errors/gql-errors/22NCA.adoc[22NCA]
675+
676+
Status description:: error: data exception - node element type already exists. A node element type identified by the label `{ <<label>> }` already exists in the graph type.
677+
678+
=== xref:errors/gql-errors/22NCB.adoc[22NCB]
679+
680+
Status description:: error: data exception - relationship element type already exists. A relationship element type identified by the relationship type `{ <<relType>> }` already exists in the graph type.
681+
682+
=== xref:errors/gql-errors/22NCC.adoc[22NCC]
683+
684+
Status description:: error: data exception - node element type specified incorrectly. The node element type `{ <<graphTypeElement1>> }` identified by the label `{ <<label>> }` is different to the one specified in the query `{ <<graphTypeElement2>> }`.
685+
686+
=== xref:errors/gql-errors/22NCD.adoc[22NCD]
687+
688+
Status description:: error: data exception - relationship element type specified incorrectly. The relationship element type `{ <<graphTypeElement1>> }` identified by the relationship type `{ <<relType>> }` is different to the one specified in the query `{ <<graphTypeElement2>> }`.
689+
690+
=== xref:errors/gql-errors/22NCE.adoc[22NCE]
691+
692+
Status description:: error: data exception - node element type in use. The node element type identified by the label `{ <<label>> }` is referenced in the graph type element `{ <<graphTypeReference>> }`` and cannot be dropped.
693+
694+
=== xref:errors/gql-errors/22NCF.adoc[22NCF]
695+
696+
Status description:: error: data exception - graph type constraint not supported. Graph type constraint definitions are not supported in the `{ <<graphTypeOperation>> }` operation.
697+
698+
674699
[[invalid-transaction-state]]
675700
== Invalid transaction state
676701

modules/ROOT/partials/glossary.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
[[funType]]$funType:: Function type, e.g. non-deterministic or aggregate.
4646
[[graph]]$graph:: The name of a graph, for example, `myGraph`.
4747
[[graphTypeDependence]]$graphTypeDependence:: Graph type dependencency for constraint, one of `UNDESIGNATED`, `INDEPENDENT`, or `DEPENDENT`.
48+
[[graphTypeElement]]$graphTypeElement:: An element of a graph type, for example `(:Node => { name :: STRING})`, or `(:Src)-[:REL =>]->(:Target)`.
4849
[[graphTypeReference]]$graphTypeReference:: Graph type reference, for example, `(:Node =>)` or `p`.
4950
[[graphTypeOperation]]$graphTypeOperation:: Graph type operation, for example, one of `SET`, `ADD`, `DROP` or `ALTER`.
5051
[[hint]]$hint:: Freeform description of a hint, for example, `USING INDEX n:N(prop)`.

0 commit comments

Comments
 (0)