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

add annotation to some examples of type-conversion clause #2398

Merged
merged 1 commit into from
Dec 27, 2023
Merged
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: 2 additions & 0 deletions docs-2.0-zh/3.ngql-guide/3.data-types/9.type-conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## 示例

```ngql
# 将列表拆分,并各自转换为布尔值显示。
nebula> UNWIND [true, false, 'true', 'false', NULL] AS b \
RETURN toBoolean(b) AS b;
+----------+
Expand All @@ -23,6 +24,7 @@ nebula> UNWIND [true, false, 'true', 'false', NULL] AS b \
| __NULL__ |
+----------+

# 将整数或字符串转换为浮点数。
nebula> RETURN toFloat(1), toFloat('1.3'), toFloat('1e3'), toFloat('not a number');
+------------+----------------+----------------+-------------------------+
| toFloat(1) | toFloat("1.3") | toFloat("1e3") | toFloat("not a number") |
Expand Down