summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-12-15 23:36:58 +0200
committerLV-426 <lv-426@taproot.org.il>2014-12-16 15:08:37 +0200
commitbc5d0e72bbad1700d6738ae94ee35ad1d7455b39 (patch)
tree1935312642feca69da79dafe74baddfc3829e8fe /res
parentda9d742978d685048c622f8607ec5e2615e97d19 (diff)
Neo4J DB reset script: reset-db__single_link.cypher
Diffstat (limited to 'res')
-rw-r--r--res/neo4j/reset-db__single_link.cypher15
1 files changed, 15 insertions, 0 deletions
diff --git a/res/neo4j/reset-db__single_link.cypher b/res/neo4j/reset-db__single_link.cypher
new file mode 100644
index 00000000..39dcf6e4
--- /dev/null
+++ b/res/neo4j/reset-db__single_link.cypher
@@ -0,0 +1,15 @@
+// Flush
+match (n) optional match (n)-[r]-() delete n,r;
+
+//
+// Constraints
+//
+// FIXME: use wildcard constraint when supported
+//
+create constraint on (x:Person) assert x.name is unique;
+create constraint on (x:Skill) assert x.name is unique;
+
+// Data
+create (x:Person {name:'Bob', id: 'p_0', description: 'Bob is ...' });
+create (x:Skill {name:'Kung-Fu', id: 's_0', description: 'Kung-Fu is ...'});
+match (m:Person {id: 'p_0'}),(n:Skill {id: 's_0'}) create (m)-[:Knows {id: 'l_0'}]->(n);