Keywords¶
Keywords have significance in nGQL. It can be classified into reserved keywords and non-reserved keywords.
Non-reserved keywords are permitted as identifiers without quoting. To use reserved keywords as identifiers, quote them with backticks such as AND
.
Note
Keywords are case-insensitive.
nebula> CREATE TAG TAG(name string);
[ERROR (-7)]: SyntaxError: syntax error near `TAG'
nebula> CREATE TAG `TAG` (name string);
Execution succeeded
nebula> CREATE TAG SPACE(name string);
Execution succeeded
TAG
is a reserved keyword. To useTAG
as an identifier, you must quote it with backticks.
SPACE
is a non-reserved keyword. You can use it as an identifier without quoting it.
Reserved keywords¶
GO
AS
TO
OR
AND
XOR
USE
SET
FROM
WHERE
MATCH
INSERT
YIELD
RETURN
DESCRIBE
DESC
VERTEX
EDGE
EDGES
UPDATE
UPSERT
WHEN
DELETE
FIND
LOOKUP
ALTER
STEPS
STEP
OVER
UPTO
REVERSELY
INDEX
INDEXES
REBUILD
BOOL
INT8
INT16
INT32
INT64
INT
FLOAT
DOUBLE
STRING
FIXED_STRING
TIMESTAMP
DATE
TIME
DATETIME
TAG
TAGS
UNION
INTERSECT
MINUS
NO
OVERWRITE
SHOW
ADD
CREATE
DROP
REMOVE
IF
NOT
EXISTS
WITH
CHANGE
GRANT
REVOKE
ON
BY
IN
NOT_IN
DOWNLOAD
GET
OF
ORDER
INGEST
COMPACT
FLUSH
SUBMIT
ASC
ASCENDING
DESCENDING
DISTINCT
FETCH
PROP
BALANCE
STOP
LIMIT
OFFSET
IS
NULL
RECOVER
EXPLAIN
PROFILE
FORMAT
CASE
Non-reserved keywords¶
HOST
HOSTS
SPACE
SPACES
VALUE
VALUES
USER
USERS
PASSWORD
ROLE
ROLES
GOD
ADMIN
DBA
GUEST
GROUP
PARTITION_NUM
REPLICA_FACTOR
VID_TYPE
CHARSET
COLLATE
COLLATION
ATOMIC_EDGE
ALL
ANY
SINGLE
NONE
REDUCE
LEADER
UUID
DATA
SNAPSHOT
SNAPSHOTS
ACCOUNT
JOBS
JOB
PATH
BIDIRECT
STATS
STATUS
FORCE
PART
PARTS
DEFAULT
HDFS
CONFIGS
TTL_DURATION
TTL_COL
GRAPH
META
STORAGE
SHORTEST
NOLOOP
OUT
BOTH
SUBGRAPH
CONTAINS
NOT_CONTAINS
STARTS
STARTS_WITH
NOT_STARTS_WITH
ENDS
ENDS_WITH
NOT_ENDS_WITH
IS_NULL
IS_NOT_NULL
IS_EMPTY
IS_NOT_EMPTY
UNWIND
SKIP
OPTIONAL
THEN
ELSE
END
GROUPS
ZONE
ZONES
INTO
LISTENER
ELASTICSEARCH
FULLTEXT
AUTO
FUZZY
PREFIX
REGEXP
WILDCARD
TEXT
SEARCH
CLIENTS
SIGN
SERVICE
TEXT_SEARCH
RESET
PLAN
COMMENT
SESSIONS
SESSION
SAMPLE
QUERIES
QUERY
KILL
TOP
TRUE
FALSE
Last update: August 24, 2021