Database Reference
In-Depth Information
minTimeuuid() and maxTimeuuid()
The minTimeuuid and maxTimeuuid functions are used when querying
ranges of TimeUUID s by their embedded time. When using these methods, it
is important to note that they do not generate RFC-4122-compliant UUIDs. This
means that the values returned are not guaranteed to be globally unique and there-
fore should be used only when querying data and never for inserting data. The
functions take a parameter that is compatible with the timestamp type. See Listing
4.1 for example usage.
Listing 4.1 Example Usage of minTimeuuid() and maxTimeuuid()
Click here to view code image
SELECT *
FROM events
WHERE event_time > maxTimeuuid('2013-01-01
00:05+0000')
AND event_time < minTimeuuid('2013-02-02
10:00+0000')
dateOf() and unixTimestampOf()
The dateOf and unixTimestampOf functions take an argument of
TimeUUID and return the timestamp in it. The dateOf method will return a type
of timestamp , whereas the unixTimestampOf method will return a bi-
gint that is representative of the number of milliseconds since the UNIX epoch.
Commands
CQL 3 supports a subset of the SQL commands. In the following sections, we will
describe the commands that are currently supported and show example usage of
each one.
 
Search WWH ::




Custom Search