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

command-&-result-updates #2530

Merged
merged 2 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ nebula> RETURN reduce(totalNum = -4 * 5, n IN [1, 2] | totalNum + n * 2) AS r;
+-----+

nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \
RETURN nodes(p)[0].age AS src1, nodes(p)[1].age AS dst2, \
reduce(totalAge = 100, n IN nodes(p) | totalAge + n.age) AS sum;
RETURN nodes(p)[0].player.age AS src1, nodes(p)[1].player.age AS dst2, \
reduce(totalAge = 100, n IN nodes(p) | totalAge + n.player.age) AS sum;
+------+------+-----+
| src1 | dst2 | sum |
+------+------+-----+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ nebula> WITH [1, 2, 3, 4, 5, NULL] AS a \
+-------------------------+

nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \
RETURN nodes(p)[0].name AS n1, nodes(p)[1].name AS n2, \
all(n IN nodes(p) WHERE n.name NOT STARTS WITH "D") AS b;
RETURN nodes(p)[0].player.name AS n1, nodes(p)[1].player.name AS n2, \
all(n IN nodes(p) WHERE n.player.name NOT STARTS WITH "D") AS b;
+----------------+-------------------+-------+
| n1 | n2 | b |
+----------------+-------------------+-------+
Expand All @@ -76,7 +76,7 @@ nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \
+----------------+-------------------+-------+

nebula> MATCH p = (n:player{name:"LeBron James"})-[:follow]->(m) \
RETURN single(n IN nodes(p) WHERE n.age > 40) AS b;
RETURN single(n IN nodes(p) WHERE n.player.age > 40) AS b;
+------+
| b |
+------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ SHOW CREATE SPACE <space_name>;

```ngql
nebula> SHOW CREATE SPACE basketballplayer;
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32), atomic_edge = false)" |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32))" |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
```
10 changes: 5 additions & 5 deletions docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ nebula> CREATE SPACE IF NOT EXISTS my_space_3 (partition_num=15, replica_factor=
# 克隆图空间。
nebula> CREATE SPACE IF NOT EXISTS my_space_4 as my_space_3;
nebula> SHOW CREATE SPACE my_space_4;
+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "my_space_4" | "CREATE SPACE `my_space_4` (partition_num = 15, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(30), atomic_edge = false) ON default_zone_127.0.0.1_9779 comment = '测试图空间'" |
+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "my_space_4" | "CREATE SPACE `my_space_4` (partition_num = 15, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(30)) comment = '测试图空间'" |
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

!!! caution
Expand Down