Question

I'd like to get first n rows then next n rows and it continues like that. How can I do that in phpcassa/Cassandra?

//Edit
I've seen ColumnFamily::create_slice_predicate method in phpcassa but it's private and get method always expects row key. I want something like Cassandra-Cluster-Admin's browse column family functionality. I just want to know if there's a phpcassa solution or should I dig the thrift API?

Was it helpful?

Solution

Use ColumnFamily::get_range. It does what you want, but wraps it in a nice Iterator interface so that you don't have to do the chunking yourself.

You can find an example of it in the phpcassa tutorial.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top