19 lines
1.1 KiB
Plaintext
19 lines
1.1 KiB
Plaintext
|
// LdbcUpdate7AddComment{commentId=2199024038763, creationDate=Thu Sep 13 11:36:09 CEST 2012, locationIp='213.55.65.79', browserUsed='Firefox', content='About Arnold Schoenberg, ist movement in German poetry and art, andAbout Ecce Cor M', length=83, authorPersonId=8796093030860, countryId=76, replyToPostId=2199024038761, replyToCommentId=-1, tagIds=[146, 11287]}
|
||
|
|
||
|
CREATE (c:Comment:Message {id: "2199024038763", creationDate: 1347528969834, locationIP: '213.55.65.79', browserUsed: 'Firefox', content: 'About Arnold Schoenberg, ist movement in German poetry and art, andAbout Ecce Cor M', length: 83});
|
||
|
|
||
|
// For replyOfId: if replyToCommentId is -1, then use replyToPostId
|
||
|
|
||
|
MATCH (m:Comment {id: "2199024038763"}),
|
||
|
(p:Person {id: "8796093030860"}),
|
||
|
(r:Message {id: "2199024038761"}),
|
||
|
(c:Place {id: "76"})
|
||
|
OPTIONAL MATCH (t:Tag)
|
||
|
WHERE t.id IN ["146", "11287"]
|
||
|
WITH m, p, r, c, collect(t) as tagSet
|
||
|
CREATE (m)-[:HAS_CREATOR]->(p),
|
||
|
(m)-[:REPLY_OF]->(r),
|
||
|
(m)-[:IS_LOCATED_IN]->(c)
|
||
|
// FOREACH (t IN tagSet| CREATE (m)-[:HAS_TAG]->(t));
|
||
|
WITH m, tagSet UNWIND tagSet AS t CREATE (m)-[:HAS_TAG]->(t);
|