The easiest way to pull out a range of columns in a supercolumn would
be to use an anonymous supercolumn object - it will build the proper
predicate etc. for you and there'll be no need to deal with Thrift
directly.
so something like :
// Create the supercolumn that's aware of its name ($tag), it's key
($keyId) and keyspace ($ks)
$sc = new PandraSuperColumn($tag, $keyId, $ks);
// Bind it to a column family
$sc->setColumnFamilyName($cfName);
// predicate shortcuts... reversed, limit 5
$sc->limit(5)->reverse()->load();
// You can then iterate over the supercolumn as if it were an array...
// columns etc. can be changed/saved independently
foreach ($sc as $column) {
echo "$column->getName() timestamp is $column->timestamp value
$column->getValue()<br>";
var_dump($column);
}
... should work for you. FYI there's a few methods for retrieving
SuperColumns detailed in the UUID examples (
http://github.com/
mjpearson/Pandra/blob/master/examples/uuid_supercolumn.class.php)
which might also help.
-michael