From de10062a0cdbe7db638bcb04559c1d7b9e0bf13a Mon Sep 17 00:00:00 2001 From: "max.zhu@vesoft.com" <86282370+izhuxiaoqing@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:02:10 +0800 Subject: [PATCH] Update 4.fetch.md (#811) * Update 4.fetch.md * Update 4.fetch.md --- .../7.general-query-statements/4.fetch.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md b/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md index b7dc66c916b..5e56cac9f5d 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md @@ -1,5 +1,7 @@ # FETCH + + The `FETCH` statement retrieves the properties of the specified vertices or edges. ## OpenCypher Compatibility @@ -13,7 +15,7 @@ This topic applies to native nGQL only. ```ngql FETCH PROP ON {[, tag_name ...] | *} [, vid ...] -[YIELD ] +[YIELD [AS ]]; ``` |Parameter|Description| @@ -21,7 +23,8 @@ FETCH PROP ON {[, tag_name ...] | *} |`tag_name`|The name of the tag.| |`*`|Represents all the tags in the current graph space.| |`vid`|The vertex ID.| -|`output`|Specifies the information to be returned. For more information, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `FETCH` returns all the matched information.| +|`YIELD`|Define the output to be returned. The defined properties and `VertexID` are returned. For details, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `vertices_` is returned by default, which contains all the information about the vertex. | +|`AS`| Set an alias.| ### Fetch vertex properties by one tag @@ -42,9 +45,9 @@ Use a `YIELD` clause to specify the properties to be returned. ```ngql nebula> FETCH PROP ON player "player100" \ - YIELD player.name; + YIELD player.name AS name; +-------------+--------------+ -| VertexID | player.name | +| VertexID | name | +-------------+--------------+ | "player100" | "Tim Duncan" | +-------------+--------------+ @@ -132,7 +135,7 @@ FETCH PROP ON -> [@] [, ->