I was curious if it's possible to SELECT a specific index from a list collection in Cassandra. Say I have:
CREATE TABLE users (
user_id text PRIMARY KEY,
order_list list<text>
);
UPDATE users
SET ordered_list = [ 'thing1', 'thing2', 'thing3' ] WHERE user_id = 'user1';
Is it possible to then get back an index of ordered_list, such as ordered_list[1] from a CQL query instead of the entire list?
No, you can't. You can
UPDATE
andDELETE
with subscripts, but notSELECT
orINSERT
.