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

add annotation #2411

Merged
merged 3 commits into from
Jan 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) \
使用`WHERE`子句也可以实现相同的操作:

```ngql
# 查找类型为 player,名字为 Tim Duncan 的点。
nebula> MATCH (v:player) \
WHERE v.player.name == "Tim Duncan" \
RETURN v;
Expand Down Expand Up @@ -157,6 +158,7 @@ nebula> WITH ['Tim Duncan', 'Yao Ming'] AS names \
用户可以使用点 ID 去匹配点。`id()`函数可以检索点的 ID。

```ngql
# 查找 ID 为 “player101” 的点。(注:ID 全局唯一)。
nebula> MATCH (v) \
WHERE id(v) == 'player101' \
RETURN v;
Expand All @@ -170,6 +172,7 @@ nebula> MATCH (v) \
要匹配多个点的 ID,可以用`WHERE id(v) IN [vid_list]`或者`WHERE id(v) IN {vid_list}`。

```ngql
# 查找与 `Tim Duncan` 直接相连的点,并且这些点的 ID 必须是 `player101` 或 `player102`。
nebula> MATCH (v:player { name: 'Tim Duncan' })--(v2) \
WHERE id(v2) IN ["player101", "player102"] \
RETURN v2;
Expand Down Expand Up @@ -215,7 +218,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})--(v2:player) \
用户可以在`--`符号上增加`<`或`>`符号指定边的方向。

```ngql
# -->表示边从 v 开始,指向 v2。对于点 v 来说是出边,对于点 v2 来说是入边。
# `-->` 表示边从 v 开始,指向 v2。对于点 v 来说是出边,对于点 v2 来说是入边。
nebula> MATCH (v:player{name:"Tim Duncan"})-->(v2:player) \
RETURN v2.player.name AS Name;
+-----------------+
Expand Down