Skip to content

Commit 6987a8f

Browse files
committed
Make Interactive Cypher implementations more explicit: add 'Message' node labels where applicable
1 parent 6f54312 commit 6987a8f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

cypher/queries/interactive-complex-3.cypher

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
MATCH (person:Person {id:$personId})-[:KNOWS*1..2]-(friend:Person)<-[:HAS_CREATOR]-(messageX),
1+
MATCH (person:Person {id:$personId})-[:KNOWS*1..2]-(friend:Person)<-[:HAS_CREATOR]-(messageX:Message),
22
(messageX)-[:IS_LOCATED_IN]->(countryX:Place)
33
WHERE
44
not(person=friend)
55
AND not((friend)-[:IS_LOCATED_IN]->()-[:IS_PART_OF]->(countryX))
66
AND countryX.name=$countryXName AND messageX.creationDate>=$startDate
77
AND messageX.creationDate<$endDate
88
WITH friend, count(DISTINCT messageX) AS xCount
9-
MATCH (friend)<-[:HAS_CREATOR]-(messageY)-[:IS_LOCATED_IN]->(countryY:Place)
9+
MATCH (friend)<-[:HAS_CREATOR]-(messageY:Message)-[:IS_LOCATED_IN]->(countryY:Place)
1010
WHERE
1111
countryY.name=$countryYName
1212
AND not((friend)-[:IS_LOCATED_IN]->()-[:IS_PART_OF]->(countryY))

cypher/queries/interactive-complex-7.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MATCH (person:Person {id:$personId})<-[:HAS_CREATOR]-(message)<-[like:LIKES]-(liker:Person)
1+
MATCH (person:Person {id:$personId})<-[:HAS_CREATOR]-(message:Message)<-[like:LIKES]-(liker:Person)
22
WITH liker, message, like.creationDate AS likeTime, person
33
ORDER BY likeTime DESC, toInteger(message.id) ASC
44
WITH

cypher/queries/interactive-complex-8.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MATCH
2-
(start:Person {id:$personId})<-[:HAS_CREATOR]-()<-[:REPLY_OF]-(comment:Comment)-[:HAS_CREATOR]->(person:Person)
2+
(start:Person {id:$personId})<-[:HAS_CREATOR]-(:Message)<-[:REPLY_OF]-(comment:Comment)-[:HAS_CREATOR]->(person:Person)
33
RETURN
44
person.id AS personId,
55
person.firstName AS personFirstName,

cypher/queries/interactive-complex-9.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MATCH (:Person {id:$personId})-[:KNOWS*1..2]-(friend:Person)<-[:HAS_CREATOR]-(message)
1+
MATCH (:Person {id:$personId})-[:KNOWS*1..2]-(friend:Person)<-[:HAS_CREATOR]-(message:Message)
22
WHERE message.creationDate < $maxDate
33
RETURN DISTINCT
44
friend.id AS personId,

cypher/queries/interactive-short-2.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MATCH (:Person {id:$personId})<-[:HAS_CREATOR]-(m)-[:REPLY_OF*0..]->(p:Post)
1+
MATCH (:Person {id:$personId})<-[:HAS_CREATOR]-(m:Message)-[:REPLY_OF*0..]->(p:Post)
22
MATCH (p)-[:HAS_CREATOR]->(c)
33
RETURN
44
m.id as messageId,

0 commit comments

Comments
 (0)