CQL Constants
Following are the kind of constants in CQL
Constants
|
Defining Value
|
string
|
\'' (any character where ' can appear
if doubled)+ '\'' '$$' (any character
other than '$$') '$$'
|
integer
|
re('-?[0-9]+')
|
float
|
re('-?[0-9]+(\.[0-9]*)?([eE][+-]?[0-9+])?')
| NAN | INFINITY
|
boolean
|
TRUE | FALSE
|
uuid
|
hex{8}-hex{4}-hex{4}-hex{4}-hex{12}
|
hex
|
re("[0-9a-fA-F]")
|
blob
|
'0' ('x' | 'X') hex+
|
Remark Point:-
- A string constant is an arbitrary sequence of characters enclosed by single-quote ('). Single-quote can be used without escaping ($$It's raining today$$).
- Integer, float and boolean constant are defined as expected. Note that the float allows NaN and Infinity constants.
- CQL supports UUID constants.
- Blobs content are provided in hexadecimal and prefixed by 0x.
- The special NULL constant denotes the absence of value.
No comments:
Post a comment