Skip to content

Commit

Permalink
replace is1 & is3 with go
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Aug 8, 2022
1 parent ffc464d commit e541f75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
12 changes: 1 addition & 11 deletions nebula/queries/interactive-short-1.ngql
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
MATCH (n:Person)-[:IS_LOCATED_IN]->(p:Place)
WHERE id(n)==$personId
RETURN
n.Person.firstName AS firstName,
n.Person.lastName AS lastName,
n.Person.birthday AS birthday,
n.Person.locationIP AS locationIP,
n.Person.browserUsed AS browserUsed,
id(p) AS cityId,
n.Person.gender AS gender,
n.Person.creationDate AS creationDate
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
9 changes: 1 addition & 8 deletions nebula/queries/interactive-short-3.ngql
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
MATCH (n:Person)-[r:KNOWS]-(friend)
WHERE id(n) == $personId
RETURN
toInteger(substr(id(friend), 2)) AS personId,
friend.Person.firstName AS firstName,
friend.Person.lastName AS lastName,
r.creationDate AS friendshipCreationDate
ORDER BY friendshipCreationDate DESC, personId ASC
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
7 changes: 1 addition & 6 deletions nebula/queries/interactive-short-5.ngql
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
MATCH (m)-[:POST_HAS_CREATOR | COMMENT_HAS_CREATOR]->(p:Person)
WHERE id(m) == $commentId OR id(m) == $postId
RETURN
id(p) AS personId,
p.Person.firstName AS firstName,
p.Person.lastName AS lastName
GO FROM $commentId OVER COMMENT_HAS_CREATOR YIELD COMMENT_HAS_CREATOR._dst AS personId, $$.Person.firstName AS firstName, $$.Person.lastName AS lastName UNION GO FROM $postId OVER POST_HAS_CREATOR YIELD POST_HAS_CREATOR._dst AS personId, $$.Person.firstName AS firstName, $$.Person.lastName AS lastName

0 comments on commit e541f75

Please sign in to comment.