Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 3.go.md #1132

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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