get() public method

public get ( $key, $super_column = NULL, $slice_start = "", $slice_finish = "", $column_reversed = False, $column_count = self::DEFAULT_COLUMN_LIMIT )
Esempio n. 1
0
 public function get($p)
 {
     $ret['s'] = 'OK';
     $t = new CassandraCF('mall', 'UserItem', true);
     $id = $p['u'];
     $ret['d'] = $t->get($id);
     return $ret;
 }
Esempio n. 2
0
 public function all($p)
 {
     $ret['s'] = 'ok';
     $t = new CassandraCF('mall', 'UserItem', true);
     $id = $p['u'];
     //	    $t->put($p,$id);
     //	    $t->put_super($p,$id);
     $ret['d'] = $t->get($id);
     return $ret;
 }
Esempio n. 3
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);
 }