Skip to content

Commit

Permalink
Updated keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChen2023 committed Nov 1, 2023
1 parent 67588ee commit 5e83687
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

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`."

It is not recommend to use keywords in schema. If you must use keywords in schema:
It is not recommended to use keywords to identify schemas. If you must use keywords as identifiers, pay attention to the following restrictions:

- 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\`.
- To use reserved keywords or special characters as identifiers, you must enclose them with backticks (\`), such as \`AND\`. Otherwise, a syntax error is thrown.

- To use special characters or reserved keywords as identifiers, quote them with backticks such as `AND`.
- To use non-reserved keywords as identifiers:

- If the identifier contains any uppercase letter, you must enclose them with backticks (\`), such as \`Comment\`. Otherwise, the execution succeeds but the system automatically converts the identifier to all lowercase.
- If the identifier contains all lowercase letters, you do not need to enclose them with backticks (\`).

!!! Note

Expand Down Expand Up @@ -61,13 +64,14 @@ EDGE
EDGES
EXISTS
EXPLAIN
FALSE
FETCH
FIND
FIXED_STRING
FLOAT
FLUSH
FORMAT
FROM
GEOGRAPHY
GET
GO
GRANT
Expand All @@ -85,24 +89,23 @@ INT64
INT8
INTERSECT
IS
LIMIT
JOIN
LEFT
LIST
LOOKUP
MAP
MATCH
MINUS
NO
NOT
NOT_IN
NULL
OF
OFFSET
ON
OR
ORDER
OVER
OVERWRITE
PROFILE
PATH
PROP
REBUILD
RECOVER
Expand All @@ -123,7 +126,9 @@ TAGS
TIME
TIMESTAMP
TO
TRUE
UNION
UNWIND
UPDATE
UPSERT
UPTO
Expand All @@ -142,13 +147,18 @@ YIELD
```ngql
ACCOUNT
ADMIN
AGENT
ALL
ALLSHORTESTPATHS
ANALYZER
ANY
ATOMIC_EDGE
AUTO
BASIC
BIDIRECT
BOTH
CHARSET
CLEAR
CLIENTS
COLLATE
COLLATION
Expand All @@ -158,62 +168,72 @@ CONTAINS
DATA
DBA
DEFAULT
DIVIDE
DRAINER
DRAINERS
ELASTICSEARCH
ELSE
END
ENDS
ENDS_WITH
FALSE
ES_QUERY
FORCE
FORMAT
FULLTEXT
FUZZY
GOD
GRANTS
GRAPH
GROUP
GROUPS
GUEST
HDFS
HOST
HOSTS
HTTP
HTTPS
INTO
IS_EMPTY
IS_NOT_EMPTY
IS_NOT_NULL
IS_NULL
IP
JOB
JOBS
KILL
LEADER
LIMIT
LINESTRING
LISTENER
LOCAL
MERGE
META
NEW
NOLOOP
NONE
NOT_CONTAINS
NOT_ENDS_WITH
NOT_STARTS_WITH
OFFSET
OPTIONAL
OUT
PART
PARTITION_NUM
PARTS
PASSWORD
PATH
PLAN
PREFIX
POINT
POLYGON
PROFILE
QUERIES
QUERY
READ
REDUCE
REGEXP
RENAME
REPLICA_FACTOR
RESET
ROLE
ROLES
S2_MAX_CELLS
S2_MAX_LEVEL
SAMPLE
SEARCH
SERVICE
SESSION
SESSIONS
SHORTEST
SHORTESTPATH
SIGN
SINGLE
SKIP
Expand All @@ -222,26 +242,26 @@ SNAPSHOTS
SPACE
SPACES
STARTS
STARTS_WITH
STATS
STATUS
STORAGE
SUBGRAPH
SYNC
TEXT
TEXT_SEARCH
THEN
TOP
TRUE
TTL_COL
TTL_DURATION
UNWIND
USER
USERS
UUID
VALUE
VALUES
VARIABLES
VID_TYPE
WILDCARD
WHITELIST
WRITE
ZONE
ZONES
```
Loading

0 comments on commit 5e83687

Please sign in to comment.