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

specify-expression-of-returning-properties-for-edges #2679

Merged
merged 1 commit into from
Mar 24, 2023
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
17 changes: 16 additions & 1 deletion docs-2.0/3.ngql-guide/8.clauses-and-options/return.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) \

## 返回属性

使用语法`{<vertex_name>|<edge_name>}.<property>`返回点或边的属性
使用语法`<vertex_name>.<tag_name>.<property_name>`返回点的属性;使用语法`<edge_name>.<property_name>`返回边的属性

```ngql
// 返回点的属性
nebula> MATCH (v:player) \
RETURN v.player.name, v.player.age \
LIMIT 3;
Expand All @@ -144,6 +145,20 @@ nebula> MATCH (v:player) \
+------------------+--------------+
```

```ngql
// 返回边的属性
nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->() \
RETURN e.start_year, e.degree \
+--------------+----------+
| e.start_year | e.degree |
+--------------+----------+
| __NULL__ | 95 |
| __NULL__ | 95 |
| 1997 | __NULL__ |
+--------------+----------+
```


使用`properties()`函数返回点或边的所有属性。

```ngql
Expand Down