forked from ldbc/ldbc_snb_interactive_v1_impls
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from nevermore3/add_sf100
add sf100
- Loading branch information
Showing
44 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
MATCH p=(person:Person)-[:KNOWS*1..3]-(friend:Person {firstName: $firstName}) | ||
WHERE id(person) == $personId | ||
AND person <> friend | ||
WITH friend, length(p) AS distance | ||
LIMIT 20 | ||
MATCH (friend)-[:IS_LOCATED_IN]->(friendCity:Place) | ||
OPTIONAL MATCH (friend)-[studyAt:STUDY_AT]->(uni:Organisation)-[:IS_LOCATED_IN]->(uniCity:Place) | ||
WITH | ||
friend, | ||
collect( | ||
CASE uni.Organisation.name | ||
WHEN null THEN null | ||
ELSE [uni.Organisation.name, studyAt.classYear, uniCity.Place.name] | ||
END | ||
) AS unis, | ||
friendCity, | ||
distance | ||
OPTIONAL MATCH (friend)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(companyCountry:Place) | ||
WITH | ||
friend, | ||
collect( | ||
CASE company.Organisation.name | ||
WHEN null THEN null | ||
ELSE [company.Organisation.name, workAt.workFrom, companyCountry.Place.name] | ||
END | ||
) AS companies, | ||
unis, | ||
friendCity, | ||
distance | ||
RETURN | ||
id(friend) AS friendId, | ||
friend.Person.lastName AS friendLastName, | ||
distance AS distanceFromPerson, | ||
friend.Person.birthday AS friendBirthday, | ||
friend.Person.creationDate AS friendCreationDate, | ||
friend.Person.gender AS friendGender, | ||
friend.Person.browserUsed AS friendBrowserUsed, | ||
friend.Person.locationIP AS friendLocationIp, | ||
friend.Person.email AS friendEmails, | ||
friend.Person.speaks AS friendLanguages, | ||
friendCity.Place.name AS friendCityName, | ||
unis AS friendUniversities, | ||
companies AS friendCompanies | ||
ORDER BY distanceFromPerson ASC, friendLastName ASC | ||
LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO 1 TO 2 STEPS FROM $personId OVER KNOWS BIDIRECT WHERE KNOWS._dst != $personId YIELD distinct KNOWS._dst AS friendId | GO FROM $-.friendId OVER WORK_AT WHERE WORK_AT.workFrom < $workFromYear YIELD $-.friendId AS friendId, $^.Person.firstName AS firstName, $^.Person.lastName AS lastName, WORK_AT.workFrom AS workFrom, WORK_AT._dst AS orgId| GO FROM $-.orgId OVER IS_LOCATED_IN WHERE $$.Place.name == $countryName YIELD toInteger(substr($-.friendId, 2)) AS personId, $-.firstName AS personFirstName, $-.lastName AS personLastName, $^.Organisation.name AS organizationName, $-.workFrom AS organizationWorkFromYear | ORDER BY $-.organizationWorkFromYear ASC, $-.personId ASC, $-.organizationName DESC | LIMIT 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
MATCH (n:Person)-[:KNOWS]-(friend:Person)<-[:COMMENT_HAS_CREATOR]-(`comment`:`Comment`)-[:REPLY_OF_POST]->(:Post)-[:HAS_TAG]->(`tag`:`Tag`)-[:HAS_TYPE]->(tagClass:Tagclass)-[:IS_SUBCLASS_OF*0..100]->(baseTagClass:Tagclass) | ||
WHERE id(n) == $personId AND (tagClass.Tagclass.name == $tagClassName OR baseTagClass.Tagclass.name == $tagClassName) | ||
RETURN | ||
/* id(friend) AS personId, 属性裁剪待改进, 暂时通过以下写法规避问题*/ | ||
true ? id(friend) : id(n)+id(tagClass)+id(baseTagClass) AS personId, | ||
friend.Person.firstName AS personFirstName, | ||
friend.Person.lastName AS personLastName, | ||
collect(DISTINCT `tag`.`Tag`.name) AS tagNames, | ||
count(DISTINCT id(`comment`)) AS replyCount | ||
ORDER BY replyCount DESC, personId ASC | ||
LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
find shortest path from $person1Id to $person2Id over KNOWS BIDIRECT yield path as p|yield collect(length($-.p)) AS l | yield case size($-.l) when 0 then -1 else $-.l[0] end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
GO FROM $personId OVER KNOWS BIDIRECT YIELD KNOWS._dst AS friendId | ||
| GO FROM $-.friendId OVER POST_HAS_CREATOR_NEW, COMMENT_HAS_CREATOR_NEW REVERSELY WHERE (COMMENT_HAS_CREATOR_NEW.creationDate is not EMPTY and COMMENT_HAS_CREATOR_NEW.creationDate <= $maxDate) or (POST_HAS_CREATOR_NEW.creationDate is not EMPTY and POST_HAS_CREATOR_NEW.creationDate <= $maxDate) | ||
YIELD | ||
toInteger(substr($-.friendId, 2)) AS personId, | ||
$^.Person.firstName AS personFirstName, | ||
$^.Person.lastName AS personLastName, | ||
toInteger(substr(id($$), 2)) AS messageId, | ||
CASE WHEN COMMENT_HAS_CREATOR_NEW.content is not EMPTY THEN COMMENT_HAS_CREATOR_NEW.content ELSE CASE size(POST_HAS_CREATOR_NEW.imageFile) WHEN 0 THEN POST_HAS_CREATOR_NEW.content ELSE POST_HAS_CREATOR_NEW.imageFile END END AS messageContent, | ||
CASE WHEN COMMENT_HAS_CREATOR_NEW.creationDate is not EMPTY THEN COMMENT_HAS_CREATOR_NEW.creationDate ELSE POST_HAS_CREATOR_NEW.creationDate END AS messageCreationDate | ||
| ORDER BY $-.messageCreationDate DESC, $-.messageId ASC | LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
MATCH (countryX:Place{name:$countryXName}) | ||
MATCH (countryY:Place{name:$countryYName}) | ||
MATCH (person:Person) | ||
WHERE id(person) == $personId | ||
WITH person, id(countryX) AS countryXId, id(countryY) AS countryYId | ||
LIMIT 1 | ||
MATCH (city:Place)-[:IS_PART_OF]->(country:Place) | ||
WITH person, id(country) AS countryId, countryXId, countryYId, id(city) AS cityId | ||
WHERE countryId IN [countryXId, countryYId] | ||
WITH person, countryXId, countryYId, collect(cityId) AS cities | ||
MATCH (person)-[:KNOWS*1..2]-(friend)-[:IS_LOCATED_IN]->(city) | ||
WITH id(person) AS personId, friend, id(city) AS cityId, cities, countryXId, countryYId | ||
WHERE personId<>id(friend) AND NOT cityId IN cities | ||
WITH DISTINCT friend, countryXId, countryYId | ||
MATCH (friend)<-[:POST_HAS_CREATOR|COMMENT_HAS_CREATOR]-(message) | ||
WHERE | ||
CASE | ||
WHEN $endDate > message.`Comment`.creationDate AND message.`Comment`.creationDate >= $startDate THEN true | ||
WHEN $endDate > message.Post.creationDate AND message.Post.creationDate >= $startDate THEN true | ||
ELSE false | ||
END | ||
MATCH (message)-[:IS_LOCATED_IN]->(country) | ||
WITH friend, id(country) AS countryId, countryXId, countryYId | ||
WHERE countryId IN [countryXId, countryYId] | ||
WITH friend, | ||
CASE WHEN countryId==countryYId THEN 1 ELSE 0 END AS messageX, | ||
CASE WHEN countryId==countryYId THEN 1 ELSE 0 END AS messageY | ||
WITH friend, sum(messageX) AS xCount, sum(messageY) AS yCount | ||
WHERE xCount>0 AND yCount>0 | ||
RETURN | ||
tointeger(substr(id(friend), 2)) AS friendId, | ||
friend.Person.firstName AS friendFirstName, | ||
friend.Person.lastName AS friendLastName, | ||
xCount, | ||
yCount, | ||
xCount + yCount AS xyCount | ||
ORDER BY xyCount DESC, friendId ASC | ||
LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
MATCH (person:Person)-[:KNOWS]-(:Person)<-[:POST_HAS_CREATOR]-(post:Post)-[:HAS_TAG]->(`tag`:`Tag`) | ||
WHERE id(person) == $personId AND post.Post.creationDate >= $startDate AND post.Post.creationDate < $endDate | ||
WITH person, count(post) AS postsOnTag, `tag` | ||
OPTIONAL MATCH (person)-[:KNOWS]-()<-[:POST_HAS_CREATOR]-(oldPost:Post)-[:HAS_TAG]->(`tag`) | ||
WHERE oldPost.Post.creationDate < $startDate | ||
WITH person, postsOnTag, `tag`, count(oldPost) AS cp | ||
WHERE cp == 0 | ||
RETURN | ||
`tag`.`Tag`.name AS tagName, | ||
sum(postsOnTag) AS postCount | ||
ORDER BY postCount DESC, tagName ASC | ||
limit 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO 1 TO 2 STEPS FROM $personId OVER KNOWS WHERE KNOWS._dst != $personId YIELD distinct KNOWS._dst AS friendId | GO FROM $-.friendId OVER HAS_MEMBER REVERSELY WHERE HAS_MEMBER.joinDate > $minDate YIELD distinct HAS_MEMBER._dst AS forumId, $-.friendId as friendId| GO FROM $-.forumId OVER CONTAINER_OF YIELD $-.friendId AS friendId, $^.Forum.title AS title, $-.forumId AS forumId, CONTAINER_OF._dst AS postId | GO FROM $-.postId OVER POST_HAS_CREATOR WHERE POST_HAS_CREATOR._dst == $-.friendId YIELD $-.forumId AS forumId, $-.title AS forumTitle, $-.postId AS postId | group by $-.forumId, $-.forumTitle YIELD toInteger(substr($-.forumId, 2)) AS forumId, $-.forumTitle AS forumTitle, count($-.postId) AS postCount | ORDER BY $-.postCount DESC, $-.forumId ASC | LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO 1 to 2 steps from $personId over KNOWS bidirect where KNOWS._dst <> $personId yield distinct KNOWS._dst as friend | GO from $-.friend over POST_HAS_CREATOR reversely yield distinct POST_HAS_CREATOR._dst as friendPost | GO from $-.friendPost over HAS_TAG where $$.`Tag`.name==$tagName yield distinct HAS_TAG._src as postWithSpecifiedTag | GO from $-.postWithSpecifiedTag over HAS_TAG where $$.`Tag`.name<>$tagName yield distinct $$.`Tag`.name as otherTagName, HAS_TAG._src as commonPost | group by $-.otherTagName yield $-.otherTagName as otherTagName, count($-.commonPost) as postCount | order by $-.postCount desc, $-.otherTagName ASC | limit 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
MATCH (person:Person)<-[:POST_HAS_CREATOR|COMMENT_HAS_CREATOR]-(message)<-[like:LIKES_COMMENT|LIKES_POST]-(liker:Person) | ||
WHERE id(person) == $personId | ||
WITH | ||
liker, | ||
message, | ||
like.creationDate AS likeTime, | ||
person, | ||
id(message) AS messageId | ||
ORDER BY | ||
likeTime DESC, | ||
messageId ASC | ||
WITH | ||
liker, | ||
head(collect({msg:message, likeTime:likeTime})) AS latestLike, | ||
person | ||
OPTIONAL MATCH p = (liker)-[:KNOWS]-(person) | ||
RETURN | ||
toInteger(substr(id(liker), 2)) AS personId, | ||
liker.Person.firstName AS personFirstName, | ||
liker.Person.lastName AS personLastName, | ||
latestLike.likeTime AS likeCreationDate, | ||
id(latestLike.msg) AS messageId, | ||
CASE exists(latestLike.msg.content) | ||
WHEN true THEN latestLike.msg.content | ||
ELSE latestLike.msg.imageFile | ||
END AS messageContent, | ||
latestLike.msg.creationDate AS messageCreationDate, | ||
p IS NULL AS isNew | ||
ORDER BY | ||
likeCreationDate DESC, | ||
personId ASC | ||
LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO FROM $personId OVER POST_HAS_CREATOR, COMMENT_HAS_CREATOR REVERSELY YIELD id($$) AS messageId | GO FROM $-.messageId OVER REPLY_OF_COMMENT, REPLY_OF_POST REVERSELY YIELD id($$) AS commentId | GO FROM $-.commentId OVER COMMENT_HAS_CREATOR YIELD COMMENT_HAS_CREATOR._dst AS personId, $$.Person.firstName AS personFirstName, $$.Person.lastName AS personLastName, $^.`Comment`.creationDate AS commentCreationDate, toInteger(substr($-.commentId, 2)) AS commentId, $^.`Comment`.content AS commentContent |ORDER BY $-.commentCreationDate DESC, $-.commentId ASC|LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GO 1 TO 2 STEPS FROM $personId OVER KNOWS BIDIRECT | ||
WHERE KNOWS._dst != $personId | ||
YIELD DISTINCT | ||
KNOWS._dst AS personId, | ||
$$.Person.firstName AS personFirstName, | ||
$$.Person.lastName AS personLastName | ||
| GO FROM $-.personId OVER POST_HAS_CREATOR_NEW, COMMENT_HAS_CREATOR_NEW REVERSELY | ||
WHERE (COMMENT_HAS_CREATOR_NEW.creationDate is not EMPTY and COMMENT_HAS_CREATOR_NEW.creationDate < $maxDate) OR (POST_HAS_CREATOR_NEW.creationDate is not EMPTY and POST_HAS_CREATOR_NEW.creationDate < $maxDate) | ||
YIELD | ||
$-.personId AS personId, | ||
$-.personFirstName AS personFirstName, | ||
$-.personLastName AS personLastName, | ||
toInteger(substr(id($$), 2)) AS messageId, | ||
CASE WHEN COMMENT_HAS_CREATOR_NEW.content is not EMPTY THEN COMMENT_HAS_CREATOR_NEW.content ELSE CASE size(POST_HAS_CREATOR_NEW.imageFile) WHEN 0 THEN POST_HAS_CREATOR_NEW.content ELSE POST_HAS_CREATOR_NEW.imageFile END END AS messageContent, | ||
CASE WHEN COMMENT_HAS_CREATOR_NEW.creationDate is not EMPTY THEN COMMENT_HAS_CREATOR_NEW.creationDate ELSE POST_HAS_CREATOR_NEW.creationDate END AS messageCreationDate | ||
| ORDER BY $-.messageCreationDate DESC, $-.messageId ASC | LIMIT 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO FROM $personId OVER IS_LOCATED_IN YIELD $^.Person.firstName AS firstName, $^.Person.lastName AS lastName, $^.Person.birthday AS birthday, $^.Person.locationIP AS locationIP, $^.Person.browserUsed AS browserUsed, IS_LOCATED_IN._dst AS cityId, $^.Person.gender AS gender, $^.Person.creationDate AS creationDate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
MATCH (n:Person)<-[:COMMENT_HAS_CREATOR | POST_HAS_CREATOR]-(message)-[:REPLY_OF_POST | REPLY_OF_COMMENT*0..100]->(p:Post) | ||
WHERE id(n)==$personId | ||
MATCH (p)-[:POST_HAS_CREATOR]->(c) | ||
RETURN | ||
id(message) as messageId, | ||
CASE tags(message)[0] | ||
WHEN "Comment" THEN message.`Comment`.content | ||
ELSE CASE size(message.Post.imageFile) WHEN 0 THEN message.Post.content ELSE message.Post.imageFile END | ||
END AS messageContent, | ||
CASE tags(message)[0] | ||
WHEN "Comment" THEN message.`Comment`.creationDate | ||
ELSE message.Post.creationDate | ||
END AS messageCreationDate, | ||
id(p) AS originalPostId, | ||
id(c) AS originalPostAuthorId, | ||
c.Person.firstName as originalPostAuthorFirstName, | ||
c.Person.lastName as originalPostAuthorLastName | ||
ORDER BY messageCreationDate DESC | ||
LIMIT 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO FROM $personId OVER KNOWS BIDIRECT YIELD toInteger(substr(KNOWS._dst, 2)) AS personId, $$.Person.firstName AS firstName, $$.Person.lastName AS lastName, KNOWS.creationDate AS friendshipCreationDate | ORDER BY $-.friendshipCreationDate DESC, $-.personId ASC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FETCH PROP ON `Comment`, Post $commentId, $postId YIELD CASE WHEN `Comment`.creationDate is not EMPTY THEN `Comment`.creationDate ELSE Post.creationDate END AS messageCreationDate, CASE WHEN `Comment`.content is not EMPTY THEN `Comment`.content ELSE CASE size(Post.imageFile) WHEN 0 THEN Post.content ELSE Post.imageFile END END AS messageContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GO FROM $commentId, $postId OVER COMMENT_HAS_CREATOR, POST_HAS_CREATOR YIELD id($$) AS personId, $$.Person.firstName AS firstName, $$.Person.lastName AS lastName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MATCH (m)-[:REPLY_OF_COMMENT | REPLY_OF_POST *0..100]->(p:Post)<-[:CONTAINER_OF]-(f:Forum)-[:HAS_MODERATOR]->(mod:Person) | ||
WHERE id(m) == $commentId OR id(m) == $postId | ||
RETURN | ||
id(f) AS forumId, | ||
f.Forum.title AS forumTitle, | ||
id(mod) AS moderatorId, | ||
mod.Person.firstName AS moderatorFirstName, | ||
mod.Person.lastName AS moderatorLastName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
MATCH (m)<-[:REPLY_OF_COMMENT|REPLY_OF_POST]-(c:`Comment`)-[:COMMENT_HAS_CREATOR]->(p:Person) | ||
WHERE id(m) == $commentId OR id(m) == $postId | ||
OPTIONAL MATCH (m)-[:COMMENT_HAS_CREATOR|POST_HAS_CREATOR]->(a:Person)-[r:KNOWS]-(p) | ||
RETURN | ||
id(c) AS commentId, | ||
c.`Comment`.content AS commentContent, | ||
c.`Comment`.creationDate AS commentCreationDate, | ||
toInteger(substr(id(p), 2)) AS replyAuthorId, | ||
p.Person.firstName AS replyAuthorFirstName, | ||
p.Person.lastName AS replyAuthorLastName, | ||
CASE r | ||
WHEN null THEN false | ||
ELSE true | ||
END AS replyAuthorKnowsOriginalMessageAuthor | ||
ORDER BY commentCreationDate DESC, replyAuthorId |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-1-add-person-companies.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
WORK_AT(workFrom) | ||
VALUES | ||
$personId->$organizationId:($worksFromYear) |
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-1-add-person-place.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
IS_LOCATED_IN() | ||
VALUES | ||
$personId->$cityId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-1-add-person-tags.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_INTEREST() | ||
VALUES | ||
$personId->$tagId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-1-add-person-universities.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
STUDY_AT(classYear) | ||
VALUES | ||
$personId->$organizationId:($studiesFromYear) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT VERTEX IF NOT EXISTS | ||
Person(firstName, lastName, gender, birthday, creationDate, locationIP, browserUsed) | ||
VALUES | ||
$personId:($personFirstName, $personLastName, $gender, $birthday, $creationDate, $locationIP, $browserUsed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
LIKES_POST(creationDate) | ||
VALUES | ||
$personId->$postId:($creationDate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
LIKES_COMMENT(creationDate) | ||
VALUES | ||
$personId->$commentId:($creationDate) |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-4-add-forum-person.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_MODERATOR() | ||
VALUES | ||
$forumId->$moderatorPersonId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-4-add-forum-tags.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_TAG() | ||
VALUES | ||
$forumId->$tagId:() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT VERTEX IF NOT EXISTS | ||
Forum(title, creationDate) | ||
VALUES | ||
$forumId:($forumTitle, $creationDate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_MEMBER(joinDate) | ||
VALUES | ||
$forumId->$personId:($joinDate) |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-6-add-post-forum.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
CONTAINER_OF() | ||
VALUES | ||
$forumId->$postId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-6-add-post-person.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
POST_HAS_CREATOR() | ||
VALUES | ||
$postId->$authorPersonId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-6-add-post-place.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
IS_LOCATED_IN() | ||
VALUES | ||
$postId->$countryId:() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_TAG() | ||
VALUES | ||
$postId->$tagId:() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT VERTEX IF NOT EXISTS | ||
Post(creationDate, locationIP, browserUsed, language, content, imageFile, length) | ||
VALUES | ||
$postId:($creationDate, $locationIP, $browserUsed, $language, $content, $imageFile, $length) |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-7-add-comment-comment.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
REPLY_OF_COMMENT() | ||
VALUES | ||
$commentId->$replyToCommentId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-7-add-comment-person.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
COMMENT_HAS_CREATOR() | ||
VALUES | ||
$commentId->$personId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-7-add-comment-place.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
IS_LOCATED_IN() | ||
VALUES | ||
$commentId->$countryId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-7-add-comment-post.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
REPLY_OF_POST() | ||
VALUES | ||
$commentId->$replyToPostId:() |
4 changes: 4 additions & 0 deletions
4
nebula/queries-sf100/interactive-update-7-add-comment-tags.ngql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
HAS_TAG() | ||
VALUES | ||
$commentId->$tagId:() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT VERTEX IF NOT EXISTS | ||
`Comment`(creationDate, locationIP, browserUsed, content, length) | ||
VALUES | ||
$commentId:($creationDate, $locationIP, $browserUsed, $content, $length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT EDGE IF NOT EXISTS | ||
KNOWS(creationDate) | ||
VALUES | ||
$person1Id->$person2Id:($creationDate) |