From c30c3b9e2ce8d842c24a959c21aa4fa9b2006c81 Mon Sep 17 00:00:00 2001 From: knqiufan <34114995+knqiufan@users.noreply.github.com> Date: Tue, 26 Dec 2023 00:16:48 +0800 Subject: [PATCH] add annotation to some examples of `list` clause as titled --- docs-2.0-zh/3.ngql-guide/5.operators/8.list.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs-2.0-zh/3.ngql-guide/5.operators/8.list.md b/docs-2.0-zh/3.ngql-guide/5.operators/8.list.md index 6c9a06be6be..6c2b07dd168 100644 --- a/docs-2.0-zh/3.ngql-guide/5.operators/8.list.md +++ b/docs-2.0-zh/3.ngql-guide/5.operators/8.list.md @@ -11,6 +11,7 @@ ## 示例 ```ngql +# 返回连接后的列表。 nebula> YIELD [1,2,3,4,5]+[6,7] AS myList; +-----------------------+ | myList | @@ -18,6 +19,7 @@ nebula> YIELD [1,2,3,4,5]+[6,7] AS myList; | [1, 2, 3, 4, 5, 6, 7] | +-----------------------+ +# 返回列表中的元素数量。 nebula> RETURN size([NULL, 1, 2]); +------------------+ | size([NULL,1,2]) | @@ -25,6 +27,7 @@ nebula> RETURN size([NULL, 1, 2]); | 3 | +------------------+ +# 返回 NULL 是否存在列表中。 nebula> RETURN NULL IN [NULL, 1]; +--------------------+ | (NULL IN [NULL,1]) | @@ -32,6 +35,7 @@ nebula> RETURN NULL IN [NULL, 1]; | __NULL__ | +--------------------+ +# 返回在列表[2, 3, 4, 5]中存在,且也在列表[2, 3, 8]中存在的元素,并拆分显示。 nebula> WITH [2, 3, 4, 5] AS numberlist \ UNWIND numberlist AS number \ WITH number \ @@ -44,6 +48,7 @@ nebula> WITH [2, 3, 4, 5] AS numberlist \ | 3 | +--------+ +# 返回列表中下标为 1 的元素。 nebula> WITH ['Anne', 'John', 'Bill', 'Diane', 'Eve'] AS names RETURN names[1] AS result; +--------+ | result |