Skip to content

Commit

Permalink
specify-expression-of-returning-properties-for-edges (#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber authored Mar 24, 2023
1 parent bdcfd91 commit 9db81cc
Showing 1 changed file with 16 additions and 1 deletion.
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

0 comments on commit 9db81cc

Please sign in to comment.