summaryrefslogtreecommitdiff
path: root/res/neo4j/reset-db__single_link.cypher
blob: 2fd2617ccb5a14c052b76e77f99565d006953cf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Flush
match (n) optional match (n)-[r]-() delete r,n;

//
// 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;

// init commit block chain
create (n:__HEAD:__Commit {hash: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', blob: ''});

// 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);