forked from otar/rest-api-friendships
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-data.cypher
108 lines (98 loc) · 2.67 KB
/
test-data.cypher
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
FOREACH (
data IN [
{
firstName: 'Tyrion',
lastName: 'Lannister'
},
{
firstName: 'Cersei',
lastName: 'Lannister'
},
{
firstName: 'Daenerys',
lastName: 'Targaryen'
},
{
firstName: 'Jon',
lastName: 'Snow'
},
{
firstName: 'Sansa',
lastName: 'Stark'
},
{
firstName: 'Arya',
lastName: 'Stark'
},
{
firstName: 'Jorah',
lastName: 'Mormont'
},
{
firstName: 'Jamie',
lastName: 'Lannister'
},
{
firstName: 'Samwell',
lastName: 'Tarly'
},
{
firstName: 'Theon',
lastName: 'Greyjoy'
}
] |
CREATE (user:Profile {
firstName: data.firstName,
lastName: data.lastName
})
);
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 0
AND ID(user2) = 1
CREATE (user1)-[request:FRIEND_REQUEST { status: 'pending', createdAt: TIMESTAMP() }]->(user2)
RETURN request;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 2
AND ID(user2) = 3
CREATE (user1)-[request:FRIEND_REQUEST { status: 'pending', createdAt: TIMESTAMP() }]->(user2)
RETURN request;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 4
AND ID(user2) = 5
CREATE (user1)-[request:FRIEND_REQUEST { status: 'accepted', createdAt: TIMESTAMP() }]->(user2)
RETURN request;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 6
AND ID(user2) = 7
CREATE (user1)-[request:FRIEND_REQUEST { status: 'accepted', createdAt: TIMESTAMP() }]->(user2)
RETURN request;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 8
AND ID(user2) = 9
CREATE (user1)-[request:FRIEND_REQUEST { status: 'declined', createdAt: TIMESTAMP() }]->(user2)
RETURN request;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 0
AND ID(user2) = 1
CREATE (user1)-[friends:FRIENDS { since: TIMESTAMP() }]->(user2)
RETURN friends;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 0
AND ID(user2) = 2
CREATE (user1)-[friends:FRIENDS { since: TIMESTAMP() }]->(user2)
RETURN friends;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 2
AND ID(user2) = 3
CREATE (user1)-[friends:FRIENDS { since: TIMESTAMP() }]->(user2)
RETURN friends;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 2
AND ID(user2) = 4
CREATE (user1)-[friends:FRIENDS { since: TIMESTAMP() }]->(user2)
RETURN friends;
MATCH (user1:Profile), (user2:Profile)
WHERE ID(user1) = 4
AND ID(user2) = 5
CREATE (user1)-[friends:FRIENDS { since: TIMESTAMP() }]->(user2)
RETURN friends;