关键字

关键字在nGQL中有重要意义,分为保留关键字和非保留关键字。

非保留关键字作为标识符时可以不使用引号。保留关键字作为标识符时,需要用反引号(`)将它们括起来,例如`AND`。

说明:关键字不区分大小写。

  1. nebula> CREATE TAG TAG(name string);
  2. [ERROR (-7)]: SyntaxError: syntax error near `TAG'
  3. nebula> CREATE TAG `TAG` (name string);
  4. Execution succeeded
  5. nebula> CREATE TAG SPACE(name string);
  6. Execution succeeded
  • TAG是保留关键字,要将TAG作为标识符,您必须使用反引号(`)括起来。

  • SPACE是非保留关键字,可以直接作为标识符使用。

保留关键字

  1. ADD
  2. ALTER
  3. AND
  4. AS
  5. ASC
  6. BALANCE
  7. BOOL
  8. BY
  9. CASE
  10. CHANGE
  11. COMPACT
  12. CREATE
  13. DATE
  14. DATETIME
  15. DELETE
  16. DESC
  17. DESCRIBE
  18. DISTINCT
  19. DOUBLE
  20. DOWNLOAD
  21. DROP
  22. EDGE
  23. EDGES
  24. EXISTS
  25. EXPLAIN
  26. FETCH
  27. FIND
  28. FIXED_STRING
  29. FLOAT
  30. FLUSH
  31. FORMAT
  32. FROM
  33. GET
  34. GO
  35. GRANT
  36. IF
  37. IN
  38. INDEX
  39. INDEXES
  40. INGEST
  41. INSERT
  42. INT
  43. INT16
  44. INT32
  45. INT64
  46. INT8
  47. INTERSECT
  48. IS
  49. LIMIT
  50. LOOKUP
  51. MATCH
  52. MINUS
  53. NO
  54. NOT
  55. NULL
  56. OF
  57. OFFSET
  58. ON
  59. OR
  60. ORDER
  61. OVER
  62. OVERWRITE
  63. PROFILE
  64. PROP
  65. REBUILD
  66. RECOVER
  67. REMOVE
  68. RETURN
  69. REVERSELY
  70. REVOKE
  71. SET
  72. SHOW
  73. STEP
  74. STEPS
  75. STOP
  76. STRING
  77. SUBMIT
  78. TAG
  79. TAGS
  80. TIME
  81. TIMESTAMP
  82. TO
  83. UNION
  84. UPDATE
  85. UPSERT
  86. UPTO
  87. USE
  88. VERTEX
  89. WHEN
  90. WHERE
  91. WITH
  92. XOR
  93. YIELD

非保留关键字

  1. ACCOUNT
  2. ADMIN
  3. ALL
  4. ANY
  5. ATOMIC_EDGE
  6. AUTO
  7. AVG
  8. BIDIRECT
  9. BIT_AND
  10. BIT_OR
  11. BIT_XOR
  12. BOTH
  13. CHARSET
  14. CLIENTS
  15. COLLATE
  16. COLLATION
  17. COLLECT
  18. COLLECT_SET
  19. CONFIGS
  20. CONTAINS
  21. COUNT
  22. COUNT_DISTINCT
  23. DATA
  24. DBA
  25. DEFAULT
  26. ELASTICSEARCH
  27. ELSE
  28. END
  29. ENDS
  30. FALSE
  31. FORCE
  32. FUZZY
  33. GOD
  34. GRAPH
  35. GROUP
  36. GROUPS
  37. GUEST
  38. HDFS
  39. HOST
  40. HOSTS
  41. INTO
  42. JOB
  43. JOBS
  44. LEADER
  45. LISTENER
  46. MAX
  47. META
  48. MIN
  49. NOLOOP
  50. NONE
  51. OPTIONAL
  52. OUT
  53. PART
  54. PARTITION_NUM
  55. PARTS
  56. PASSWORD
  57. PATH
  58. PLAN
  59. PREFIX
  60. REGEXP
  61. REPLICA_FACTOR
  62. RESET
  63. ROLE
  64. ROLES
  65. SEARCH
  66. SERVICE
  67. SHORTEST
  68. SIGN
  69. SINGLE
  70. SKIP
  71. SNAPSHOT
  72. SNAPSHOTS
  73. SPACE
  74. SPACES
  75. STARTS
  76. STATS
  77. STATUS
  78. STD
  79. STORAGE
  80. SUBGRAPH
  81. SUM
  82. TEXT
  83. TEXT_SEARCH
  84. THEN
  85. TRUE
  86. TTL_COL
  87. TTL_DURATION
  88. UNWIND
  89. USER
  90. USERS
  91. UUID
  92. VALUE
  93. VALUES
  94. VID_TYPE
  95. WILDCARD
  96. ZONE
  97. ZONES