public function get($p) { $ret['s'] = 'OK'; $t = new CassandraCF('mall', 'UserItem', true); $id = $p['u']; $ret['d'] = $t->get($id); return $ret; }
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; }
function UserItem() { parent::CassandraCF('mall', 'UserItem', 1, 'BytesType', 'BytesType'); }
function UserCar() { parent::CassandraCF('mall', 'UserCar', 'Super', 'BytesType', 'BytesType'); }
function UserInfo() { parent::CassandraCF('mall', 'UserInfo', '', 'BytesType', ''); }
function UserMessage() { parent::CassandraCF('mall', 'UserMessage', 1, 'TimeUUIDType', 'BytesType'); }
function UserFriend() { parent::CassandraCF('mall', 'UserFriend', 'Super', 'BytesType', 'BytesType'); }
function UserStat() { parent::CassandraCF('mall', 'UserStat', 1, 'BytesType', 'BytesType'); }
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); }
function UserOp() { parent::CassandraCF('mall', 'UserOp', 'Super', 'TimeUUIDType', 'BytesType'); }