April 2017
Beginner to intermediate
360 pages
9h 35m
English
The most powerful feature of CQL collections is the ability to write discrete values to a collection. It's possible to append a single value to a list, update a single key-value pair in a map, remove a specific value from a set, and so on.
At read time, however, there is no special support for reading discrete values. For instance, we might want to be able to do something like the following to read a specific element from a list column:
SELECT "shared_by"[2] FROM "user_status_updates" WHERE "username" = 'alice' AND "id" = 76e7a4d0-e796-11e3-90ce-5f98e903bf02;
Or we might like to read the value at a specific key within a map column:
SELECT "social_identities"['twitter'] FROM "users" WHERE "username" ...
Read now
Unlock full access