Skip to content

Commit

Permalink
update comments (#2348)
Browse files Browse the repository at this point in the history
* update comments

* Update docs-2.0-en/3.ngql-guide/1.nGQL-overview/comments.md
  • Loading branch information
abby-cyber authored Nov 14, 2023
1 parent a5d7543 commit c2c3cee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs-2.0-en/3.ngql-guide/1.nGQL-overview/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This topic will describe the comments in nGQL.
## Examples

```ngql
nebula> # Do nothing in this line and return an error `StatementEmpty`.
nebula> RETURN 1+1; # This comment continues to the end of this line.
nebula> RETURN 1+1; // This comment continues to the end of this line.
nebula> RETURN 1 /* This is an in-line comment. */ + 1 == 2;
Expand All @@ -20,7 +19,10 @@ Use a backslash as a line break. \
*/ 12;
```

In nGQL statement, the backslash `\` in a line indicates a line break.
!!! note

- In nGQL statements, the backslash `\` in a line indicates a line break.
- If a statement starts with `#` or `//`, the statement is not executed and the error `StatementEmpty` is returned.

## OpenCypher compatibility

Expand Down
6 changes: 4 additions & 2 deletions docs-2.0-zh/3.ngql-guide/1.nGQL-overview/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
## Examples

```ngql
nebula> # 这行什么都不做并返回报错`StatementEmpty`。
nebula> RETURN 1+1; # 这条注释延续到行尾。
nebula> RETURN 1+1; // 这条注释延续到行尾。
nebula> RETURN 1 /* 这是一条行内注释 */ + 1 == 2;
Expand All @@ -15,7 +14,10 @@ nebula> RETURN 11 + \
*/ 12;
```

nGQL 语句中的反斜线(\)代表换行。
!!! note

- nGQL 语句中的反斜线(\)代表换行。
- 如果 nGQL 语句以`#`或者`//`开头,不会执行该行命令并且会返回提示`StatementEmpty`。

## openCypher 兼容性

Expand Down

0 comments on commit c2c3cee

Please sign in to comment.