Skip to content

Commit 85e42a1

Browse files
committed
WIP
1 parent b4446dd commit 85e42a1

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ALTER CURRENT GRAPH TYPE SET {
1818
}
1919
----
2020

21-
An error will be thrown with GQLSTATUS 22NC6 and the status description:
21+
An error will be thrown with GQLSTATUS 22NC7 and the status description:
2222

2323
[source]
2424
----

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ALTER CURRENT GRAPH TYPE SET {
1818
}
1919
----
2020

21-
An error will be thrown with GQLSTATUS 22NC6 and the status description:
21+
An error will be thrown with GQLSTATUS 22NC8 and the status description:
2222

2323
[source]
2424
----

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Attempt to define an existance constraint inline of a node element type as follo
1313
[source,cypher]
1414
----
1515
ALTER CURRENT GRAPH TYPE SET {
16-
(p :Person => {name :: STRING, age :: INT}) REQUIRE p.studId IS NOT NULL
16+
(p:Person => {name :: STRING, age :: INT}) REQUIRE p.studId IS NOT NULL
1717
}
1818
----
1919

20-
An error will be thrown with GQLSTATUS 22NC6 and the status description:
20+
An error will be thrown with GQLSTATUS 22NCA and the status description:
2121

2222
[source]
2323
----
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
11
= 22NCB
22

33
== Status description
4+
The graph type constraint is missing an alias.
45

6+
== Explanation
7+
Attempting to define a constraint against a node that is not using an alias, such as `:Node`, will cause this error.
8+
The constraint must be defined against an element type alias, for example, `n:Node`.
9+
10+
== Example scenario
11+
Attempt to define an existance constraint as follows:
12+
13+
[source,cypher]
14+
----
15+
ALTER CURRENT GRAPH TYPE SET {
16+
CONSTRAINT FOR (:Node) REQUIRE n.prop IS NOT NULL
17+
}
18+
----
19+
20+
An error will be thrown with GQLSTATUS 22NCB and the status description:
21+
22+
[source]
23+
----
24+
error: data exception - invalid element type constraints in graph type. A node element type property existence constraint cannot be specified inline of a node element type.
25+
----
26+
27+
A correct definition is as follows:
28+
29+
[source, cypher]
30+
----
31+
ALTER CURRENT GRAPH TYPE SET {
32+
CONSTRAINT FOR (n:Node) REQUIRE n.prop IS NOT NULL
33+
}
34+
----
535

636
ifndef::backend-pdf[]
737
[discrete.glossary]
838
== Glossary
939

1040
include::partial$glossary.adoc[]
11-
endif::[]
41+
endif::[]

0 commit comments

Comments
 (0)