Skip to content

Commit

Permalink
Update 3.go.md (#1132)
Browse files Browse the repository at this point in the history
  • Loading branch information
randomJoe211 authored Nov 1, 2021
1 parent d1f642d commit ea8f02f
Showing 1 changed file with 7 additions and 33 deletions.
40 changes: 7 additions & 33 deletions docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ nebula> GO FROM "player100" OVER follow REVERSELY \
+---------------------+-----------------+
| FriendOf | Team |
+---------------------+-----------------+
| "Danny Green" | "Spurs" |
| "Danny Green" | "Cavaliers" |
+---------------------+-----------------+
| "Boris Diaw" | "Spurs" |
| "Boris Diaw" | "Jazz" |
| "Boris Diaw" | "Suns" |
...
# 该MATCH查询与上一个GO查询具有相同的语义。
Expand All @@ -164,34 +164,9 @@ nebula> MATCH (v)<-[e:follow]- (v2)-[e2:serve]->(v3) \
+---------------------+-----------------+
| FriendOf | Team |
+---------------------+-----------------+
| "Tony Parker" | "Spurs" |
| "Tony Parker" | "Hornets" |
+---------------------+-----------------+
...
```

```ngql
# 返回player102所有邻居点。
nebula> GO FROM "player102" OVER follow \
YIELD dst(edge) AS both;
+-------------+
| both |
+-------------+
| "player100" |
| "player101" |
+-------------+
...
# 该MATCH查询与上一个GO查询具有相同的语义。
nebula> MATCH (v) -[e:follow]-(v2) \
WHERE id(v)== "player102" \
RETURN id(v2) AS both;
+-------------+
| both |
+-------------+
| "player101" |
| "player103" |
+-------------+
| "Boris Diaw" | "Spurs" |
| "Boris Diaw" | "Jazz" |
| "Boris Diaw" | "Suns" |
...
```

Expand All @@ -204,7 +179,6 @@ nebula> GO 1 TO 2 STEPS FROM "player100" OVER follow \
+-------------+
| "player101" |
| "player125" |
+-------------+
...
# 该MATCH查询与上一个GO查询具有相同的语义。
Expand All @@ -216,7 +190,7 @@ nebula> MATCH (v) -[e:follow*1..2]->(v2) \
+-------------+
| "player100" |
| "player102" |
+-------------+
...
```

```ngql
Expand Down

0 comments on commit ea8f02f

Please sign in to comment.