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-reserved-keywords-in-ent3.6.0 #2237

Merged
merged 1 commit into from
Aug 22, 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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Keywords

Keywords have significance in nGQL. It can be classified into reserved keywords and non-reserved keywords. It is not recommend to use keywords in schema.
Keywords in nGQL are words with particular meanings, such as `CREATE` and `TAG` in the `CREATE TAG` statement. Keywords that require special processing to be used as identifiers are referred to as `reserved keywords`, while the part of keywords that can be used directly as identifiers are called `non-reserved keywords`."

If you must use keywords in schema:
It is not recommend to use keywords in schema. If you must use keywords in schema:

- Non-reserved keywords can be used as identifiers without quotes if they are all in lowercase. However, if a non-reserved keyword contains any uppercase letters when used as an identifier, it must be enclosed in backticks (\`), for example, \`Comment\`.

Expand Down Expand Up @@ -137,6 +137,21 @@ XOR
YIELD
```

{{ent.ent_begin}}
The following reserved keywords are only available in {{nebula.release}} enterprise version.

```
JOIN
LEFT
RIGHT
INNER
OUTER
SEMI
ANTI
```
{{ent.ent_end}}


## Non-reserved keywords

```ngql
Expand Down
8 changes: 7 additions & 1 deletion docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ YIELD path as <alias>

- `SHORTEST` finds all the shortest path.

- `SINGLE SHORTEST` finds the all shortest path. If there are multiple shortest paths, only one path is returned.
- `SINGLE SHORTEST` finds the all shortest path. If there are multiple shortest paths, only one path is returned. The `SINGLE SHORTEST` is for Enterprise Edition only.

- `ALL` finds all the paths.

Expand Down Expand Up @@ -96,6 +96,7 @@ nebula> FIND SHORTEST PATH FROM "player100", "player130" TO "player132", "player
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

{{ent.ent_begin}}
```ngql
nebula> FIND SINGLE SHORTEST PATH FROM "player100", "player130" TO "player132", "player133" OVER * BIDIRECT UPTO 18 STEPS YIELD path as p;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand All @@ -108,6 +109,11 @@ nebula> FIND SINGLE SHORTEST PATH FROM "player100", "player130" TO "player132",
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

!!! enterpriseonly

The `SINGLE SHORTEST` feature is for Enterprise Edition only.
{{ent.ent_end}}

```ngql
nebula> FIND ALL PATH FROM "player100" TO "team204" OVER * WHERE follow.degree is EMPTY or follow.degree >=0 YIELD path AS p;
+------------------------------------------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ extra:
azureLatestRelease: 3.1.0 # The latest doc version that supports Azure Cloud
aliyunLatestRelease: 3.1.0 # The latest doc version that supports Alibaba Cloud
ent:
ent_begin: <!-- --> # change to "<!-- -->" when releasing core-ent
ent_end: <!-- --> # change to "<!-- -->" when releasing core-ent
ent_begin: <!-- # change to "<!-- -->" when releasing core-ent
ent_end: --> # change to "<!-- -->" when releasing core-ent

nav:
- About: README.md
Expand Down