关键字

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

最后更新: July 15, 2021