Skip to content

Commit 6f44951

Browse files
preferred variants
1 parent e0ae07f commit 6f44951

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

modules/ROOT/pages/schema/graph-types/set-graph-types.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ ALTER CURRENT GRAPH TYPE SET {
532532
(:Resident)-[:LIVES_IN => {since :: DATE NOT NULL}]->(:City),
533533
CONSTRAINT company_name FOR (c:Company) REQUIRE c.name IS KEY,
534534
CONSTRAINT animal_id FOR (a:Animal) REQUIRE a.id IS UNIQUE,
535-
CONSTRAINT resident_address FOR (resident:Resident) REQUIRE resident.address :: STRING // <1>
535+
CONSTRAINT resident_address FOR (resident:Resident) REQUIRE resident.address IS :: STRING // <1>
536536
}
537537
----
538538

modules/ROOT/pages/schema/syntax.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ 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+
The three variations of the property type expression, `IS ::`, `::`, and `IS TYPED` are syntactic synonyms for the same expression.
45+
The preferred syntax when defining node and relationship element types in a graph type is the `::` variant.
46+
4447
[[constraints-definitions]]
4548
=== Constraint definitions in graph types
4649

@@ -111,7 +114,7 @@ REQUIRE {alias.propertyName \| (alias.propertyName)} { IS NOT NULL \| {[IS] :: \
111114
For more information, see see xref:schema/graph-types/set-graph-types.adoc#constraints-on-non-identifying-labels-and-types[Set graph types -> Constraints on non-identifying labels and types].
112115

113116
The three variations of the property type expression, `IS ::`, `::`, and `IS TYPED` are syntactic synonyms for the same expression.
114-
The preferred syntax is the `::` variant.
117+
The preferred syntax when defining constraints in a graph type is the `IS ::` variant.
115118

116119
`<TYPE>` can be one of the following property types:
117120

0 commit comments

Comments
 (0)