get_count() public method

public get_count ( $key, $super_column = null )
示例#1
0
 static function testCF()
 {
     $key = time();
     $t = new CassandraCF('mall', 'UserInfo');
     $cdata = array('name' => 'user1', 'time' => time(), 'arr' => array('dfd', 'dfds'));
     echo "before insert \n";
     print_r($cdata);
     $t->put($cdata, $key);
     $retdata = $t->get($key);
     echo "after insert get\n";
     print_r($retdata);
     $udata['name'] = 'user12 modify';
     $udata['newcol'] = 'neww colvalue';
     $scname = $t->put($udata, $key);
     $retdata = $t->get($key);
     echo "after update get\n";
     print_r($retdata);
     echo '$t->get_count($key) = ' . $t->get_count($key) . "\n";
     $t->erase($key, array('name', 'time'));
     $retdata = $t->get($key);
     echo "after delete cols  get\n";
     print_r($retdata);
     echo '$t->get_count($key) = ' . $t->get_count($key) . "\n";
 }