关键字

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

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

Note

关键字不区分大小写。

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

非保留关键字

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

最后更新: October 15, 2021