Skip to content

Commit 024aaa2

Browse files
post review corrections 3 (more syntax)
1 parent 6f44951 commit 024aaa2

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

modules/ROOT/pages/schema/graph-types/alter-element-types.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:description: Information about altering a graph type.
1+
:description: Information about altering element types in a graph type.
22
:page-role: cypher-25-only new-neo4j-2025.xx enterprise-edition
33
= Alter element types
44

modules/ROOT/pages/schema/graph-types/drop-graph-type-elements.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The `ALTER CURRENT GRAPH TYPE DROP` command allows you to drop element types and constraints from a graph type.
66

77
[NOTE]
8-
Dropping element types and constraints from a graph type the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`DROP CONSTRAINT` privilege].
8+
Dropping element types and constraints from a graph type requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`DROP CONSTRAINT` privilege].
99

1010
.Set graph type
1111
[source, cypher]

modules/ROOT/pages/schema/syntax.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ More details about the syntax can be found in the link:{neo4j-docs-base-uri}/ope
1616
[source, syntax]
1717
----
1818
([alias] {IS | :} IdentifyingLabelName {=> | IMPLIES} [{IS | :} ImpliedLabelName[&...]] [“{“ {propertyName [[IS] :: | IS TYPED] <TYPE> [IS [NODE] {KEY | UNIQUE}]}[, ...] “}”])
19-
[REQUIRE {alias.propertyName | (alias.propertyName[, ...])} IS [NODE] {KEY | UNIQUE}]
19+
[REQUIRE {alias.propertyName | (alias.propertyName[, ...])} IS [NODE] {KEY | UNIQUE}][...]
2020
----
2121

2222
[NOTE]
@@ -28,7 +28,7 @@ For more information, see xref:schema/graph-types/set-graph-types.adoc#node-elem
2828
[source, syntax]
2929
-----
3030
([nodeAlias | [nodeAlias] {IS | :} LabelName [=> | IMPLIES]])-”[“ [alias] {IS | :} IDENTIFYING_RELATIONSHIP_TYPE {=> | IMPLIES} [“{“ {propertyName [[IS] :: | IS TYPED] <TYPE> [IS [REL[ATIONSHIP]] {KEY | UNIQUE}]}[, ...] “}”] “]”->([nodeAlias | [nodeAlias] {IS | :} LabelName [=> | IMPLIES]])
31-
[REQUIRE {alias.propertyName | (alias.propertyName[, ...])} IS [REL[ATIONSHIP]] {KEY | UNIQUE}]
31+
[REQUIRE {alias.propertyName | (alias.propertyName[, ...])} IS [REL[ATIONSHIP]] {KEY | UNIQUE}][...]
3232
-----
3333

3434
[NOTE]
@@ -41,6 +41,8 @@ A relationship element type requires either:
4141

4242
For more information, see xref:schema/graph-types/set-graph-types.adoc#relationship-element-types[Set graph types -> Relationship element types].
4343

44+
`<TYPE>` can be one of the property types listed in xref:schema/syntax.adoc#constraints-definitions[constraint definitions in graph types], the `NOT NULL` versions of those types, or `ANY NOT NULL`.
45+
4446
The three variations of the property type expression, `IS ::`, `::`, and `IS TYPED` are syntactic synonyms for the same expression.
4547
The preferred syntax when defining node and relationship element types in a graph type is the `::` variant.
4648

@@ -65,7 +67,7 @@ a|
6567
----
6668
CONSTRAINT [constraint_name]
6769
FOR ()-”[“alias [{IS \| :} IDENTIFYING_RELATIONSHIP_TYPE [=> \| IMPLIES]] “]”->()
68-
REQUIRE {alias.propertyName \| (alias.propertyName[, ...])} IS [REL \| RELATIONSHIP] {KEY \| UNIQUE}
70+
REQUIRE {alias.propertyName \| (alias.propertyName[, ...])} IS [REL[ATIONSHIP]] {KEY \| UNIQUE}
6971
----
7072
|===
7173

@@ -98,7 +100,7 @@ a|
98100
----
99101
CONSTRAINT [constraint_name]
100102
FOR ()-”[“alias {IS \| :} NON_IDENTIFYING_RELATIONSHIP_TYPE “]”->()
101-
REQUIRE {alias.propertyName \| (alias.propertyName[, ...])} IS [REL \| RELATIONSHIP] {KEY \| UNIQUE}
103+
REQUIRE {alias.propertyName \| (alias.propertyName[, ...])} IS [REL[ATIONSHIP]] {KEY \| UNIQUE}
102104
----
103105

104106
| Relationship property existence and property type constraint
@@ -142,11 +144,6 @@ The preferred syntax when defining constraints in a graph type is the `IS ::` va
142144
* `LIST<POINT NOT NULL>`
143145
* Any closed dynamic union of the above types, e.g. `INTEGER | FLOAT | STRING`.
144146

145-
Additionally, for properties that are part of element types:
146-
147-
* The `NOT NULL` versions of the above types
148-
* `ANY NOT NULL`
149-
150147
Allowed syntax variations of these types are listed in xref:values-and-types/property-structural-constructed.adoc#types-synonyms[Values and types -> Types and their synonyms].
151148

152149
[[set-graph-types]]
@@ -296,6 +293,8 @@ a|
296293
----
297294
|===
298295

296+
`<TYPE>` can be the same property types as for xref:schema/syntax.adoc#element-types[node and relationship element types].
297+
299298
[NOTE]
300299
If the full definition is provided, then it needs to match exactly the node or relationship element type being dropped.
301300

0 commit comments

Comments
 (0)