Use get_slice with a columnfamily parent, and you will get back a list of supercolumns, including their subcolumns.
On Sat, Dec 19, 2009 at 3:45 PM, Jiri Jakes <[email protected]> wrote: > Hello, all! > > As a newcomer, I am doing some experiments with Cassandra running on a > single node. While I have been reading about Cassandra I thought that > this task would be quite common but now I am trying to write some code > as well. > > Assume this situation: I have a column family 'Comments', the key > is an article identifier, super columns of TimeUUIDs, subcolumns like > 'author', 'email', 'www', 'text' etc. Now I would like to obtain a > single row, iterate through the super columns and for each super > column extract the values of its subcolumns. The problem is that the > Thrift interface returns only _lists_ of columns so I cannot do > anything like: > > row = getRow("article-identifier"); > foreach(superColumn : row.getSuperColumns()) { > print(superColumn.getColumn("text").getValue()); > } > > How can I do this? Or is my approach just quite odd at all (let's say -- > too "relational")? > > Thank you. > > Jiri >
