memgraph/tests/public_benchmark/ldbc/test_cases/queries/update_7.cyp
Teon Banek 26297ca641 ldbc: Extract update queries
Summary:
Convert update queries to oC supported by MG
Ignore ve2 in ldbc

Reviewers: buda, mislav.bradac, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D733
2017-09-01 14:13:04 +02:00

18 lines
1.0 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));