Esempio n. 1
0
 static function getSlice()
 {
     $key = 3;
     $t = new CassandraCF('mall', 'UserInfo');
     for ($i = 0; $i < 13; $i++) {
         $arr["add{$i}"] = array('dfd' => "add{$i}");
     }
     for ($i = 0; $i < 13; $i++) {
         $arr["bdd{$i}"] = "bdd{$i}";
     }
     $t->put($arr, $key);
     echo "get slice from='' to=''\n";
     $ret = $t->get($key);
     print_r($ret);
     echo "get slice from='add' to=''\n";
     $ret = $t->get($key, null, false, 1000, 'add', '');
     print_r($ret);
     echo "get slice from='add' to='bdd'\n";
     $ret = $t->get($key, null, false, 1000, 'add', 'bdd');
     print_r($ret);
     echo "get clos from='add1,bdd1'\n";
     $ret = $t->getcols($key, array('add1', 'bdd1'));
     print_r($ret);
 }