No there isn't, though I would like to see such a feature, albeit more
at the CQL partition layer rather than the collection layer. Anyway,
that is sometimes referred to as a capped collection in other dbs, and
you might find the history in this ticket interesting. It points to
ways to simulate the behavior client-side.
https://issues.apache.org/jira/browse/CASSANDRA-3929

-Tupshin

On Tue, Apr 22, 2014 at 2:51 AM, Jimmy Lin <y2klyf+w...@gmail.com> wrote:
> hi,
> look at the collection type support in cql3,
> e.g
> http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_list_t.html
>
> we can append or remove using "+" and "-" operator
>
> UPDATE users
>   SET top_places = top_places + [ 'mordor' ] WHERE user_id = 'frodo';
>
> UPDATE users
>   SET top_places = top_places - ['riddermark'] WHERE user_id = 'frodo';
>
>
> is there a way to keep a fixed size of the list(collection) ?
>
> I was thinking about using TTL to remove older data after certain time but
> then the list will become too big if the ttl is too long, and if ttl is too
> short I running the risk of having a empty list(if there is no new
> activity).
>
> Even if I don't use collection type and have my own table, I still ran into
> the same issue.
>
>
> Any recommendation to handle this type of situation?
>
>
> thanks
>
>

Reply via email to