From 49f1aa6d1b0df4ab9a5f2e8ab7876f3ebfade4f5 Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Wed, 1 Mar 2017 14:39:51 +0100 Subject: [PATCH] Add example for CIR-2017-173 Fixes #173 --- cip/1.accepted/CIP2016-12-14-Constraint-syntax.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cip/1.accepted/CIP2016-12-14-Constraint-syntax.adoc b/cip/1.accepted/CIP2016-12-14-Constraint-syntax.adoc index f2680afda1..5ba2a1a5f2 100644 --- a/cip/1.accepted/CIP2016-12-14-Constraint-syntax.adoc +++ b/cip/1.accepted/CIP2016-12-14-Constraint-syntax.adoc @@ -217,6 +217,14 @@ FOR (p:Programmer) REQUIRE p:Person ---- +.Constraint example from CIR-2017-173 +[source, cypher] +---- +CREATE CONSTRAINT enforce_dag_unique_for_R_links +FOR p = (a)-[:R]-(b) +REQUIRE length(p) < 2 +---- + === Interaction with existing features The main interaction between the constraints and the rest of the language occurs during updating statements.