You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Keith Wright <kw...@nanigans.com> on 2013/05/23 17:18:57 UTC
write time of CQL3 set items
Hi all,
I am using C* 1.2.4 with CQL3 and am taking advantage of the new collection support. One usage case I have is that I want a set of text and I need to know the time when each item in the set was written. If I understand CQL3 correctly, the underlying data engine utilizes composites for sets and maps (where sets are just maps with no values). I was hoping that I could store my text items as a set and then somehow get the write time of each item via WRITETIME. Instead it appears that I need to use a map of TEXT to TIMESTAMP which will increase my data set. Does anyone know I way I could expose the write time of set items?
Thanks!
Re: write time of CQL3 set items
Posted by Sylvain Lebresne <sy...@datastax.com>.
> Does anyone know I way I could expose the write time of set items?
>
You cannot currently unfortunately.
The problem is really just an API one. Since currently you can only ever
query a full collection, you cannot apply writeTime() to only an element,
and applying it to the whole collection doesn't make sense, in the sense
that each element have a write time as you said.
We'll likely allow to query individual elements of collections in the
future, at which point allowing to get the write time of said individual
will work. But let's say that today we just don't have a syntax yet to make
it work.
--
Sylvain