Timeuuid functions
About using Timeuuid functions.
- dateOf()
Used in a SELECT clause, this function extracts the timestamp of a timeuuid column in a resultset. This function returns the extracted timestamp as a date. Use unixTimestampOf() to get a raw timestamp.
- now()
Generates a new unique timeuuid when the statement is executed. This method is useful for inserting values. The value returned by now() is guaranteed to be unique.
- minTimeuuid() and maxTimeuuid()Returns a UUID-like result given a conditional time component as an argument. For example:
SELECT * FROM myTable WHERE t > maxTimeuuid('2013-01-01 00:05+0000') AND t < minTimeuuid('2013-02-02 10:00+0000')
- unixTimestampOf()
Used in a SELECT clause, this functions extracts the timestamp of a timeuuid column in a resultset. Returns the value as a raw, 64-bit integer timestamp.
The values returned by minTimeuuid and maxTimeuuid functions are not true UUIDs in that the values do not conform to the Time-Based UUID generation process specified by the RFC 4122. The results of these functions are deterministic, unlike the now function.