Skip to content

Commit 727b047

Browse files
committed
Revert "Cypher: Test whether endpoints exist before running inserts"
This reverts commit d06eefe.
1 parent 02ed560 commit 727b047

8 files changed

+1
-32
lines changed

cypher/queries/interactive-update-1.cypher

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
OPTIONAL MATCH (c:City {id: $cityId})
2-
WITH 1/count(c) AS testWhetherCityFound
31
MATCH (c:City {id: $cityId})
42
CREATE (p:Person {
53
id: $personId,
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
OPTIONAL MATCH (person:Person {id: $personId}), (post:Post {id: $postId})
2-
WITH 1/count(person) AS testWhetherPersonFound, 1/count(post) AS testWhetherPostFound
31
MATCH (person:Person {id: $personId}), (post:Post {id: $postId})
42
CREATE (person)-[:LIKES {creationDate: $creationDate}]->(post)
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
OPTIONAL MATCH (person:Person {id: $personId}), (comment:Comment {id: $commentId})
2-
WITH 1/count(person) AS testWhetherPersonFound, 1/count(comment) AS testWhetherCommentFound
31
MATCH (person:Person {id: $personId}), (comment:Comment {id: $commentId})
42
CREATE (person)-[:LIKES {creationDate: $creationDate}]->(comment)

cypher/queries/interactive-update-4.cypher

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
OPTIONAL MATCH (p:Person {id: $moderatorPersonId})
2-
WITH 1/count(p) AS testWhetherPersonFound
31
MATCH (p:Person {id: $moderatorPersonId})
42
CREATE (f:Forum {id: $forumId, title: $forumTitle, creationDate: $creationDate})-[:HAS_MODERATOR]->(p)
53
WITH f
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
OPTIONAL MATCH (f:Forum {id: $forumId}), (p:Person {id: $personId})
2-
WITH 1/count(f) AS testWhetherForumFound, 1/count(p) AS testWhetherPersonFound
31
MATCH (f:Forum {id: $forumId}), (p:Person {id: $personId})
42
CREATE (f)-[:HAS_MEMBER {creationDate: $creationDate}]->(p)

cypher/queries/interactive-update-6.cypher

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
OPTIONAL MATCH
2-
(author:Person {id: $authorPersonId}),
3-
(country:Country {id: $countryId}),
4-
(forum:Forum {id: $forumId})
5-
WITH
6-
1/count(author) AS testWhetherAuthorFound,
7-
1/count(country) AS testWhetherCountryFound,
8-
1/count(forum) AS testWhetherForumFound
9-
MATCH
10-
(author:Person {id: $authorPersonId}),
11-
(country:Country {id: $countryId}),
12-
(forum:Forum {id: $forumId})
1+
MATCH (author:Person {id: $authorPersonId}), (country:Country {id: $countryId}), (forum:Forum {id: $forumId})
132
CREATE (author)<-[:HAS_CREATOR]-(p:Post:Message {
143
id: $postId,
154
creationDate: $creationDate,

cypher/queries/interactive-update-7.cypher

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
OPTIONAL MATCH
2-
(author:Person {id: $authorPersonId}),
3-
(country:Country {id: $countryId}),
4-
(message:Message {id: $replyToPostId + $replyToCommentId})
5-
WITH
6-
1/count(author) AS testWhetherAuthorFound,
7-
1/count(country) AS testWhetherCountryFound,
8-
1/count(message) AS testWhetherMessageFound
91
MATCH
102
(author:Person {id: $authorPersonId}),
113
(country:Country {id: $countryId}),
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
OPTIONAL MATCH (p1:Person {id: $person1Id}), (p2:Person {id: $person2Id})
2-
WITH 1/count(p1) AS testWhetherP1Found, 1/count(p2) AS testWhetherP2Found
31
MATCH (p1:Person {id: $person1Id}), (p2:Person {id: $person2Id})
42
CREATE (p1)-[:KNOWS {creationDate: $creationDate}]->(p2)

0 commit comments

Comments
 (0)