Skip to content

Commit be3ca66

Browse files
mnd999renetapopova
andauthored
Apply editorial suggestions from code review
Co-authored-by: Reneta Popova <[email protected]>
1 parent 0a45679 commit be3ca66

File tree

9 files changed

+47
-46
lines changed

9 files changed

+47
-46
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
error: data exception - graph type element contains duplicated tokens. The graph type element includes a property key with name `{ <<propKey>> }` more than once.
55

66
== 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.
88

99
== Example scenario
10-
For example, try to set a graph type with :
10+
For example, try to set a graph type as follows:
1111

1212
[source,cypher]
1313
----
@@ -16,14 +16,14 @@ ALTER CURRENT GRAPH TYPE SET {
1616
}
1717
----
1818

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:
2020

2121
[source]
2222
----
2323
error: data exception - graph type element contains duplicated tokens. The graph type element includes a property key with name `prop` more than once.
2424
----
2525

26-
This can be corrected by removing the duplicate property key definition or naming the property keys uniquely:
26+
To fix this, remove the duplicate property key definition or uniquely name the property keys:
2727

2828
[source, cypher]
2929
----

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
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
7-
When defining a graph type, node element types have some effect.
7+
When defining a graph type, node element types must have some effect; otherwise, they are not allowed.
88
Ineffectual node element types are not permitted.
99

1010
== Example scenario
11-
For example, try to set a graph type with :
11+
For example, try to set a graph type as follows:
1212

1313
[source,cypher]
1414
----
@@ -17,14 +17,14 @@ ALTER CURRENT GRAPH TYPE SET {
1717
}
1818
----
1919

20-
An error will be thrown with GQLSTATUS 22NC2 and the status description:
20+
The query returns an error with GQLSTATUS 22NC2 and the status description:
2121

2222
[source]
2323
----
2424
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

27-
This can be corrected by defining at least one property type or by adding an implied label e.g.:
27+
To fix this, define at least one property type or add an implied label, for example:
2828

2929
[source,cypher]
3030
----

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
error: data exception - relationship element type is ineffectual. The relationship element type `{ <<relType>> }` must define a source, destination, or at least one property type.
55

66
== Explanation
7-
When defining a graph type, relationship element types must have some effect. To be effective, a relationship element type must define at least one of the following:
7+
When defining a graph type, relationship element types must have some effect.
8+
To be effective, a relationship element type must define at least one of the following:
89

910
* A source node element type or label
1011
* A destination node element type or label
@@ -20,14 +21,14 @@ ALTER CURRENT GRAPH TYPE SET {
2021
}
2122
----
2223

23-
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:
2425

2526
[source]
2627
----
2728
error: data exception - relationship element type is ineffectual. The relationship element type `REL` must define a source or destination, or at least one property type.
2829
----
2930

30-
This can be corrected by defining at least one property type or by adding a node element type e.g.:
31+
To fix this, define at least one property type or add a node element type, for example:
3132

3233
[source,cypher]
3334
----

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ error: data exception - a label cannot both identifying and implied. The label(s
55

66
== Explanation
77
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.
99
Attempting to define a label as both will result in this error, as it creates ambiguity in the schema definition and node identification process.
1010

1111
== 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:
1313

1414
[source,cypher]
1515
----
@@ -19,14 +19,14 @@ ALTER CURRENT GRAPH TYPE SET {
1919
}
2020
----
2121

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:
2323

2424
[source]
2525
----
2626
error: data exception - a label cannot both identifying and implied. The label(s) `Person` are defined as both identifying and implied.
2727
----
2828

29-
There are several ways to correct this, but one approch may be to add another label to both nodes and capture the property type on `name` there:
29+
One way to fix this is to add another label to both nodes and capture the property type on `name` there:
3030

3131
[source,cypher]
3232
----

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ If the referenced node or relationship type does not exist, the operation cannot
99

1010
== Example scenarios
1111

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:
1414

1515
[source,cypher]
1616
----
@@ -19,13 +19,13 @@ ALTER CURRENT GRAPH TYPE SET {
1919
}
2020
----
2121

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:
2323

2424
[source]
2525
----
2626
error: data exception - graph type element not found. The node type element referenced by '(:Node =>)' was not found.
2727
----
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 to be non-identifying, or you can define the node type element before this operation:
2929

3030
[source,cypher]
3131
----
@@ -34,8 +34,8 @@ ALTER CURRENT GRAPH TYPE SET {
3434
}
3535
----
3636

37-
=== Relationship element reference not found ===
38-
For example, try to set a graph type with a relationship element reference that does not exist:
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:
3939

4040
[source,cypher]
4141
----
@@ -45,13 +45,13 @@ ALTER CURRENT GRAPH TYPE SET {
4545
4646
----
4747

48-
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:
4949

5050
[source]
5151
----
5252
error: data exception - graph type element not found. The relationship type element referenced by 'b' was not found.
5353
----
54-
In this case, the reference could be corrected by providing a relationship type:
54+
In this case, the reference could be fixed by providing a relationship type:
5555

5656
[source,cypher]
5757
----
@@ -60,22 +60,22 @@ ALTER CURRENT GRAPH TYPE SET {
6060
}
6161
----
6262

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:
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:
6565

6666
[source,cypher]
6767
----
6868
ALTER CURRENT GRAPH TYPE SET {
6969
CONSTRAINT FOR () REQUIRE n.prop IS UNIQUE
7070
----
7171

72-
An error will be thrown with GQLSTATUS 22NC5 and the status description:
72+
The query returns an error with GQLSTATUS 22NC5 and the status description:
7373

7474
[source]
7575
----
7676
error: data exception - graph type element not found. The node type element referenced by 'n' was not found.
7777
----
78-
In this case, the reference can be corrected by providing a Label for the constraint:
78+
In this case, the reference can be fixed by providing a label for the constraint:
7979

8080
[source,cypher]
8181
----

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ The independent constraint `{ <<constrDescrOrName>> }` is using the same label `
66

77
== Explanation
88
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 serve as both an identifying label and be referenced in an independent constraint at the same time.
9+
A label cannot simultaneously serve as an identifying label and be referenced in an independent constraint.
1010

1111
== Example scenario
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:
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:
1313

1414
[source,cypher]
1515
----
@@ -19,14 +19,14 @@ ALTER CURRENT GRAPH TYPE SET {
1919
}
2020
----
2121

22-
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:
2323

2424
[source]
2525
----
2626
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.
2727
----
2828

29-
The correct fix is to define the property existence constraint as part of the node element type:
29+
To fix this, define the property existence constraint as part of the node element type:
3030

3131
[source, cypher]
3232
----

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ The independent constraint `{ <<constrDescrOrName>> }` is using the same relatio
66

77
== Explanation
88
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 label cannot serve as both an identifying label and be referenced in an independent constraint at the same time.
9+
A relationship type cannot simultaneously serve as an identifying relationship type and be referenced in an independent constraint.
1010

1111
== Example scenario
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:
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:
1313

1414
[source,cypher]
1515
----
@@ -19,14 +19,14 @@ ALTER CURRENT GRAPH TYPE SET {
1919
}
2020
----
2121

22-
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:
2323

2424
[source]
2525
----
2626
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.
2727
----
2828

29-
The correct fix is to define the property type constraint as part of the relationship element type:
29+
To fix this, define the property type constraint as part of the relationship element type:
3030

3131
[source, cypher]
3232
----

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ error: data exception - graph type contains duplicated tokens. The graph type in
66
== Explanation
77
This error occurs when a graph type definition attempts to use the same name for more than one label, relationship type, or alias within the same scope.
88
Each label, relationship type, or alias must have a unique name to avoid ambiguity in the graph schema.
9-
To resolve this error, ensure that all labels, relationship types, and aliases are uniquely named within the graph type definition.
9+
To resolve this error, ensure all labels, relationship types, and aliases are uniquely named within the graph type definition.
1010

1111
== Example scenarios
12-
12+
Let's take the following example scenarios:
1313
=== Aliases
1414

15-
Attempt to define two node element types using the same alias.
15+
For example, try to define two node element types using the same alias as follows:
1616

1717
[source,cypher]
1818
----
@@ -22,14 +22,14 @@ ALTER CURRENT GRAPH TYPE SET {
2222
}
2323
----
2424

25-
An error will be thrown with GQLSTATUS 22NC9 and the status description:
25+
The query returns an error with GQLSTATUS 22NC9 and the status description:
2626

2727
[source]
2828
----
2929
error: data exception - graph type contains duplicated tokens. The graph type includes a label, relationship type or alias with name 'p' more than once.
3030
----
3131

32-
This can be corrected by renaming one of the aliases, for example:
32+
To fix this, rename one of the aliases, for example:
3333

3434
[source,cypher]
3535
----
@@ -41,7 +41,7 @@ ALTER CURRENT GRAPH TYPE SET {
4141

4242
=== Identifiers
4343

44-
Attempt to define two relationship element types using the same relationship type.
44+
For example, try to define two relationship element types using the same relationship type as follows:
4545

4646
[source,cypher]
4747
----
@@ -51,14 +51,14 @@ ALTER CURRENT GRAPH TYPE SET {
5151
}
5252
----
5353

54-
An error will be thrown with GQLSTATUS 22NC9 and the status description:
54+
The query returns an error with GQLSTATUS 22NC9 and the status description:
5555

5656
[source]
5757
----
5858
error: data exception - graph type contains duplicated tokens. The graph type includes a label, relationship type or alias with name ':REL' more than once.
5959
----
6060

61-
In this case, the correction is to delete the duplicate relationship type definition, since they are both equivalent:
61+
To fix this, delete the duplicate relationship type definition, since they are both equivalent:
6262

6363
[source,cypher]
6464
----

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Property type and existance constrains cannot be defined as inline constraints o
88
They should be defined as part of the property description instead.
99

1010
== Example scenario
11-
Attempt to define an existance constraint inline of a node element type as follows:
11+
For example, try to define an existence constraint inline of a node element type as follows:
1212

1313
[source,cypher]
1414
----
@@ -17,14 +17,14 @@ ALTER CURRENT GRAPH TYPE SET {
1717
}
1818
----
1919

20-
An error will be thrown with GQLSTATUS 22NCA and the status description:
20+
The query returns an error with GQLSTATUS 22NCA and the status description:
2121

2222
[source]
2323
----
2424
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.
2525
----
2626

27-
A correct definition is as follows:
27+
To fix this, change the query as follows:
2828

2929
[source, cypher]
3030
----

0 commit comments

Comments
 (0)