Built-in functions in Amazon Keyspaces
Amazon Keyspaces (for Apache Cassandra) supports a variety of built-in functions that you can use in Cassandra Query Language (CQL) statements.
Topics
Scalar functions
A scalar function performs a calculation on a single value and returns the result as a single value. Amazon Keyspaces supports the following scalar functions.
Function | Description |
---|---|
|
Returns a value of the specified data type. |
|
Converts one native data type into another native data type. |
|
Returns the current date/time as a date. |
|
Returns the current date/time as a time. |
|
Returns the current date/time as a timestamp. |
|
Returns the current date/time as a timeuuid . |
|
Converts the JSON string into the selected column's data type. |
|
Returns the largest possible timeuuid for timestamp or date string.
|
|
Returns the smallest possible timeuuid for timestamp or date string.
|
|
Returns a new unique timeuuid . Supported for INSERT , UPDATE , and DELETE statements,
and as part of the WHERE clause in SELECT statements.
|
|
Converts either a timeuuid or a timestamp to a date
type. |
|
Returns the column value of the selected column in JSON format. |
|
Returns the hash value of the partition key. |
|
Converts either a timeuuid or a date to a
timestamp. |
|
Returns the expiration time in seconds for a column. |
|
Converts the specified data type into a blob . |
|
Converts either a timeuuid or a timestamp into a
bigInt . |
|
Returns a random version 4 UUID. Supported for
INSERT , UPDATE , and DELETE
statements, and as part of the WHERE clause in
SELECT statements. |
|
Returns the timestamp of the value of the specified column. |
|
(Deprecated) Extracts the timestamp of a
timeuuid , and returns the value as a date. |
|
(Deprecated) Extracts the timestamp of a
timeuuid , and returns the value as a raw, 64-bit
integer timestamp. |