Query Language Reserved Words

The following words are reserved for use by the GSQL query language. That is, a query may not use any of these words for a user-defined identifier, such as the name of a local variable or a local TUPLE type.

You should also not use words from this list to name vertex or edge types. While GSQL will not raise an error when you define the types, you will not be able to reference the types in a query.

History:

  • v3.1: Added TAGS, RESET_COLLECTION_ACCUM, WITH

There is a separate list for Reserved Words for the GSQL DDL Language.
The compiler will reject the use of a Reserved Word as a user-defined identifier.

Query Language Reserved Words
ACCUM               AND                 ANY                 API
AS                  ASC                 AVG                 BAG
BATCH               BETWEEN             BOOL                BOTH
BREAK               BY                  CASE                CATCH
COALESCE            COMPRESS            CONTINUE            COUNT
CREATE              DATETIME            DATETIME_ADD        DATETIME_SUB
DELETE              DESC                DISTRIBUTED         DO
DOUBLE              EDGE                ELSE                END
ESCAPE              EXCEPTION           FALSE               FILE
FILTER              FLOAT               FOR                 FOREACH
FROM                GRAPH               GROUP               GSQL_INT_MAX
GSQL_INT_MIN        GSQL_UINT_MAX       HAVING              IF
IN                  INSERT              INT                 INTERPRET
INTERSECT           INTERVAL            INTO                IS
ISEMPTY             JSONARRAY           JSONOBJECT          LASTHOP
LEADING             LIKE                LIMIT               LIST
LOAD_ACCUM          LOG                 MAP                 MATCH
MAX                 MIN                 MINUS               NOT
NOW                 NULL                OFFSET              OR
ORDER               PATH                PER                 PINNED
POST_ACCUM          POST-ACCUM          PRIMARY_ID          PRINT
QUERY               RAISE               RANGE               REPLACE
RESET_COLLECTION_ACCUM                  RETURN              RETURNS
RUN                 SAMPLE              SELECT              SELECT_VERTEX
SET                 SRC                 STATIC              STRING
SUM                 SYNTAX              TARGET              TAGS
TGT                 THEN                TO                  TO_CSV
TO_DATETIME         TRAILING            TRIM                TRUE
TRY                 TUPLE               TYPEDEF             UINT
UNION               UPDATE              VALUES              VERTEX
WHEN                WHERE               WHILE               WITH