diff --git a/docs-2.0/2.quick-start/4.nebula-graph-crud.md b/docs-2.0/2.quick-start/4.nebula-graph-crud.md index e298d2af966..9c0d057d1db 100644 --- a/docs-2.0/2.quick-start/4.nebula-graph-crud.md +++ b/docs-2.0/2.quick-start/4.nebula-graph-crud.md @@ -303,7 +303,7 @@ nebula> CREATE EDGE serve(start_year int, end_year int); - 从 VID 为`player101`的球员开始,沿着边`follow`查找年龄大于或等于 35 岁的球员,并返回他们的姓名和年龄,同时重命名对应的列。 ```ngql - nebula> GO FROM "player101" OVER follow WHERE properties($$).age >= 35 \ + nebula> GO FROM "player101" OVER follow WHERE $$.player.age >= 35 \ YIELD properties($$).name AS Teammate, properties($$).age AS Age; +--------------+-----+ | Teammate | Age | diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md index 5647e29db69..f8bd99aa2a9 100644 --- a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md @@ -264,10 +264,10 @@ | ------------------------------------------------------------ | ------------------------------------------------------- | | `GO FROM "player102" OVER serve` | 返回 player102 所属队伍。 | | `GO 2 STEPS FROM "player102" OVER follow` | 返回距离 player102 两跳的朋友。 | - | `GO FROM "player100", "player102" OVER serve WHERE properties(edge).start_year > 1995 YIELD DISTINCT properties($$).name AS team_name, properties(edge).start_year AS start_year, properties($^).name AS player_name` | 添加过滤条件。 | + | `GO FROM "player100", "player102" OVER serve WHERE serve.start_year > 1995 YIELD DISTINCT properties($$).name AS team_name, properties(edge).start_year AS start_year, properties($^).name AS player_name` | 添加过滤条件。 | | `GO FROM "player100" OVER follow, serve YIELD properties(edge).degree, properties(edge).start_year` | 遍历多个 Edge type。属性没有值时,会显示`UNKNOWN_PROP`。 | | `GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS destination` | 返回 player100 入方向的邻居点。 | - | `GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS id | GO FROM $-.id OVER serve WHERE properties($^).age > 20 YIELD properties($^).name AS FriendOf, properties($$).name AS Team` | 查询 player100 的朋友和朋友所属队伍。 | + | `GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS id | GO FROM $-.id OVER serve WHERE $^.player.age > 20 YIELD properties($^).name AS FriendOf, properties($$).name AS Team` | 查询 player100 的朋友和朋友所属队伍。 | | `GO FROM "player102" OVER follow YIELD dst(edge) AS both` | 返回 player102 所有邻居点。 | | `GO 2 STEPS FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($$).age AS age | GROUP BY $-.dst YIELD $-.dst AS dst, collect_set($-.src) AS src, collect($-.age) AS age` | 根据年龄分组。 | diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md index 4ea2605b33b..47723e2000f 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/1.overview.md @@ -156,7 +156,7 @@ Feature: Comparison of where clause When profiling query: """ GO FROM "player100" OVER follow - WHERE properties(edge).degree IN [v IN [95,99] WHERE v > 0] + WHERE follow.degree IN [v IN [95,99] WHERE v > 0] YIELD dst(edge), properties(edge).degree """ Then the result should be, in any order: diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md index c42589f3bae..5d5389a687e 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md @@ -30,7 +30,7 @@ nGQL 没有严格的构建格式要求,但根据恰当而统一的风格创建 ```ngql GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS id | GO FROM $-.id \ - OVER serve WHERE properties($^).age > 20 YIELD properties($^).name AS FriendOf, properties($$).name AS Team; + OVER serve WHERE $^.player.age > 20 YIELD properties($^).name AS FriendOf, properties($$).name AS Team; ``` 推荐: @@ -40,7 +40,7 @@ nGQL 没有严格的构建格式要求,但根据恰当而统一的风格创建 OVER follow REVERSELY \ YIELD src(edge) AS id | \ GO FROM $-.id OVER serve \ - WHERE properties($^).age > 20 \ + WHERE $^.player.age > 20 \ YIELD properties($^).name AS FriendOf, properties($$).name AS Team; ``` diff --git a/docs-2.0/3.ngql-guide/12.vertex-statements/4.delete-vertex.md b/docs-2.0/3.ngql-guide/12.vertex-statements/4.delete-vertex.md index b831f804618..a2a40ff8fdd 100644 --- a/docs-2.0/3.ngql-guide/12.vertex-statements/4.delete-vertex.md +++ b/docs-2.0/3.ngql-guide/12.vertex-statements/4.delete-vertex.md @@ -24,7 +24,7 @@ nebula> DELETE VERTEX "team1"; ```ngql # 结合管道符,删除符合条件的点。 -nebula> GO FROM "player100" OVER serve WHERE properties(edge).start_year == "2021" YIELD dst(edge) AS id | DELETE VERTEX $-.id; +nebula> GO FROM "player100" OVER serve WHERE serve.start_year == "2021" YIELD dst(edge) AS id | DELETE VERTEX $-.id; ``` ## 删除过程与删除邻边 diff --git a/docs-2.0/3.ngql-guide/3.data-types/6.list.md b/docs-2.0/3.ngql-guide/3.data-types/6.list.md index 8de03577212..217570111d7 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/6.list.md +++ b/docs-2.0/3.ngql-guide/3.data-types/6.list.md @@ -180,7 +180,7 @@ nebula> RETURN size([1,2,3]); +---------------+ # 将列表 [92,90] 中的元素做运算,然后在 where 子句中进行条件判断。 -nebula> GO FROM "player100" OVER follow WHERE properties(edge).degree NOT IN [x IN [92, 90] | x + $$.player.age] \ +nebula> GO FROM "player100" OVER follow WHERE follow.degree NOT IN [x IN [92, 90] | x + $$.player.age] \ YIELD dst(edge) AS id, properties(edge).degree AS degree; +-------------+--------+ | id | degree | diff --git a/docs-2.0/3.ngql-guide/5.operators/1.comparison.md b/docs-2.0/3.ngql-guide/5.operators/1.comparison.md index 1fbde4143fd..bf0e191d1b8 100644 --- a/docs-2.0/3.ngql-guide/5.operators/1.comparison.md +++ b/docs-2.0/3.ngql-guide/5.operators/1.comparison.md @@ -186,7 +186,7 @@ nebula> RETURN "a" IS NOT EMPTY; | true | +------------------+ -nebula> GO FROM "player100" OVER * WHERE properties($$).name IS NOT EMPTY YIELD dst(edge); +nebula> GO FROM "player100" OVER * WHERE $$.player.name IS NOT EMPTY YIELD dst(edge); +-------------+ | dst(EDGE) | +-------------+ diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/11.reduce.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/11.reduce.md index 11fcf825898..d0c02b8bbaf 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/11.reduce.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/11.reduce.md @@ -57,7 +57,7 @@ nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \ nebula> LOOKUP ON player WHERE player.name == "Tony Parker" \ | GO FROM $-.VertexID over follow \ - WHERE properties(edge).degree != reduce(totalNum = 5, n IN range(1, 3) | properties($$).age + totalNum + n) \ + WHERE follow.degree != reduce(totalNum = 5, n IN range(1, 3) | properties($$).age + totalNum + n) \ YIELD properties($$).name AS id, properties($$).age AS age, properties(edge).degree AS degree; +---------------------+-----+--------+ | id | age | degree | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md index 94eab57fa90..51ce6490119 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md @@ -93,7 +93,7 @@ nebula> GO 2 STEPS FROM "player102" OVER follow; ```ngql # 添加过滤条件。 nebula> GO FROM "player100", "player102" OVER serve \ - WHERE properties(edge).start_year > 1995 \ + WHERE serve.start_year > 1995 \ YIELD DISTINCT properties($$).name AS team_name, properties(edge).start_year AS start_year, properties($^).name AS player_name; +-----------------+------------+---------------------+ @@ -146,7 +146,7 @@ nebula> MATCH (v)<-[e:follow]- (v2) WHERE id(v) == 'player100' \ nebula> GO FROM "player100" OVER follow REVERSELY \ YIELD src(edge) AS id | \ GO FROM $-.id OVER serve \ - WHERE properties($^).age > 20 \ + WHERE $^.player.age > 20 \ YIELD properties($^).name AS FriendOf, properties($$).name AS Team; +---------------------+-----------------+ | FriendOf | Team | @@ -223,7 +223,7 @@ nebula> $a = GO FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) A ```ngql # 在多个边上通过 IS NOT EMPTY 进行判断。 -nebula> GO FROM "player100" OVER follow WHERE properties($$).name IS NOT EMPTY YIELD dst(edge); +nebula> GO FROM "player100" OVER follow WHERE $$.player.name IS NOT EMPTY YIELD dst(edge); +-------------+ | dst(EDGE) | +-------------+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md index 555b1162c63..a0b08add5f4 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md @@ -44,7 +44,7 @@ nebula> MATCH (v:player) \ ```ngql nebula> GO FROM "player100" \ OVER follow \ - WHERE properties(edge).degree > 90 \ + WHERE follow.degree > 90 \ OR properties($$).age != 33 \ AND properties($$).name != "Tony Parker" \ YIELD properties($$);