Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Manual. Switch to the latest stable version.
Reserved CQL Keywords and Types (Appendices)¶
Appendix A: CQL Keywords¶
CQL distinguishes between reserved and non-reserved keywords. Reserved keywords cannot be used as an identifier. They are truly reserved for the language (but one can enclose a reserved keyword by double-quotes to use it as an identifier). Non-reserved keywords, however, only have a specific meaning in a certain context but can be used as identifiers otherwise. The only raison d’être of these non-reserved keywords is convenience: some keyword are non-reserved when it was always easy for the parser to decide whether they were used as keywords or not.
Keyword |
Reserved? |
|---|---|
|
yes |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
yes |
|
yes |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
no |
|
yes |
|
no |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
no |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
no |
|
no |
|
no |
|
no |
|
no |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
yes |
|
no |
|
yes |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
no |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
|
no |
|
no |
|
no |
|
no |
|
no |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
|
no |
|
yes |
|
no |
|
no |
|
no |
|
no |
|
no |
|
yes |
|
yes |
|
yes |
|
yes |
|
no |
Note
Some keywords behave differently in function names and user-defined type names:
Function names can use
TOKENandANN, even though they’re reserved keywords, but they can’t useKEY,TTL, orWRITETIME, even though those are non-reserved keywords.User-defined type names can’t use the names of native types, such as
INT,TEXT,DURATION, orEMPTY. They also can’t useCOUNT,TTL, orWRITETIME.
To use one of these keywords as a function or type name, enclose it in double quotes.
Appendix B: CQL Reserved Types¶
The following type names are not currently used by CQL but are reserved for potential future use. User-defined types may not use reserved type names as their name.
type |
|---|
|
|
|
|
|
|
© 2016, The Apache Software Foundation.