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

Wording revision of schema related functions #2366

Merged
merged 2 commits into from
Nov 30, 2022
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
2 changes: 1 addition & 1 deletion docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
| time time() | 根据当前系统返回当前时间(UTC 时间)。 |
| datetime datetime() | 根据当前系统返回当前日期和时间(UTC 时间)。 |

* [Schema 函数](../3.ngql-guide/6.functions-and-expressions/4.schema.md)
* [Schema 相关函数](../3.ngql-guide/6.functions-and-expressions/4.schema.md)

* 原生 nGQL 语句适用

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ YIELD [VERTICES AS <vertex_alias>] [, EDGES AS <edge_alias>];
- **仅支持**`AND`运算符。
- **仅支持**过滤目的点,点的格式为`$$.tagName.propName`。
- **支持**数学函数、聚合函数、字符串函数、日期时间函数、列表函数中的通用函数和类型转化函数。
- **不支持**聚合函数、Schema 函数、条件表达式函数、谓词函数、geo 函数和自定义函数,列表函数中除通用函数以外的函数。
- **不支持**聚合函数、Schema 相关函数、条件表达式函数、谓词函数、geo 函数和自定义函数,列表函数中除通用函数以外的函数。


## 示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ nebula> GO FROM "player100" OVER follow YIELD follow._src, follow._dst, follow._

!!! compatibility "历史版本兼容性"

从 NebulaGraph 2.6.0 起支持了新的 [Schema 函数](../6.functions-and-expressions/4.schema.md)。以上示例在 NebulaGraph {{ nebula.release}} 中的近似写法如下:
从 NebulaGraph 2.6.0 起支持了新的 [Schema 相关函数](../6.functions-and-expressions/4.schema.md)。以上示例在 NebulaGraph {{ nebula.release}} 中的近似写法如下:

```ngql
GO FROM "player100" OVER follow YIELD properties($^).name AS startName, properties($$).age AS endAge;
Expand Down
13 changes: 9 additions & 4 deletions docs-2.0/3.ngql-guide/6.functions-and-expressions/4.schema.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Schema 函数
# Schema 相关函数

本文介绍 NebulaGraph 支持的 Schema 函数。Schema 函数分为两类,一类适用于原生 nGQL 语句,另一类适用于 openCypher 兼容语句
本文介绍 NebulaGraph 支持的 [Schema](../../1.introduction/2.data-model.md) 相关的函数

## 原生 nGQL 语句适用
Schema 相关的函数分为两类:

- [适用于原生 nGQL 语句](#ngql)
- [适用于 openCypher 兼容语句](#opencypher)

## 原生 nGQL 语句适用

原生 nGQL 语句的`YIELD`和`WHERE`子句中可以使用如下介绍的函数。

Expand Down Expand Up @@ -204,7 +209,7 @@ edges 返回子图中的边的信息。详情参见 [GET SUBGRAPH](../16.subgrap

path 返回路径信息。详情参见 [FIND PATH](../16.subgraph-and-path/2.find-path.md)。

## openCypher 兼容语句适用
## openCypher 兼容语句适用

openCypher 兼容语句的`RETURN`和`WHERE`子句中可以使用如下介绍的函数。

Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ YIELD [DISTINCT] <return_list>
- 遍历多个 Edge type 时,`WHERE`子句有一些限制。例如不支持`WHERE edge1.prop1 > edge2.prop2`。
- GO 语句执行时先遍历所有的点,然后再根据过滤器条件进行过滤。

- `YIELD [DISTINCT] <return_list>`:定义需要返回的输出。` <return_list>`建议使用 [Schema 函数](../6.functions-and-expressions/4.schema.md),当前支持`src(edge)`、`dst(edge)`、`type(edge)`等,暂不支持嵌套函数。详情参见 [YIELD](../8.clauses-and-options/yield.md)。
- `YIELD [DISTINCT] <return_list>`:定义需要返回的输出。` <return_list>`建议使用 [Schema 相关函数](../6.functions-and-expressions/4.schema.md),当前支持`src(edge)`、`dst(edge)`、`type(edge)`等,暂不支持嵌套函数。详情参见 [YIELD](../8.clauses-and-options/yield.md)。

- `SAMPLE <sample_list>`:用于在结果集中取样。详情参见 [SAMPLE](../8.clauses-and-options/sample.md)。

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ nav:
- 聚合函数: 3.ngql-guide/6.functions-and-expressions/15.aggregating.md
- 字符串函数: 3.ngql-guide/6.functions-and-expressions/2.string.md
- 日期时间函数: 3.ngql-guide/6.functions-and-expressions/3.date-and-time.md
- Schema 函数: 3.ngql-guide/6.functions-and-expressions/4.schema.md
- Schema 相关函数: 3.ngql-guide/6.functions-and-expressions/4.schema.md
- 列表函数: 3.ngql-guide/6.functions-and-expressions/6.list.md
- 类型转换函数: 3.ngql-guide/6.functions-and-expressions/16.type-conversion.md
- 条件表达式函数: 3.ngql-guide/6.functions-and-expressions/5.conditional-expressions.md
Expand Down