0

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?

somecallmemike
  • 441
  • 1
  • 8
  • 19

1 Answers1

1

No, you can't. You can UPDATE and DELETE with subscripts, but not SELECT or INSERT.

Theo
  • 131,503
  • 21
  • 160
  • 205