I have a Cassandra table with a column 'created_at' which stored time based uuids. Now, I need to write a function to fetch all the records in this table that were created in the last 5 minutes. I am able to do this if I store timestamps rather than uuids for this 'created_at' column like below:
LocalDateTime time = LocalDateTime.now().minusMinutes(5);
Select.Where select = select(COLUMNS)
.from(VIEW)
.where(gt('created_at', Timestamp.valueOf(time)));
But I need to work this out with time uuids rather than timestamps.