Minimum possible timeuuid in php (phpcassa)

pycassa has pycassa.util.convert_time_to_uuid(time_arg, lowest_val=True, randomize=False)

phpcassa has static string uuid1 ([string $node = null], [int $time = null])

Is it possible to use phpcassa uuid1 to get the smallest / highest uuids like pycassa? If not, what is the best approach to ensure that you get everything between two given timestamps?

+4
source share
2 answers

Strictly speaking, Cassandra is sorted primarily by the timestamp v1 UUID component, and in the case of binding, it is sorted by the remaining bytes:

 int res = compareTimestampBytes(o1, o2); if (res != 0) return res; return o1.compareTo(o2); 

phpcassa offers something similar to pycassa here. As a workaround, you can set the last 8 bytes of the return value to 0x00.

0
source

I believe that if you have a column with a type of UUID of version 1, Cassandra will ignore the “unique” component of the UUID and just use the time part for the range.

+1
source

All Articles