«удалить данные из нескольких ключей»:
function batch_remove($key=null, $columns=null, $super_column=null, $write_consistency_level=null) {
$timestamp = CassandraUtil::get_time();
$deletion = new cassandra_Deletion();
$deletion->timestamp = $timestamp;
if ($super_column !== null) $deletion->super_column = $this->pack_name($super_column, true);
else $deletion->super_column = null;
if ($columns !== null) {
$predicate = $this->create_slice_predicate($columns, '', '', false, self::DEFAULT_COLUMN_COUNT);
$deletion->predicate = $predicate;
}
$mutation = new cassandra_Mutation();
$mutation->deletion = $deletion;
if (is_array($key) && count($key) >= 1) {
$mut_map = array();
foreach($key as $v) {
$packed_key[$v] = $this->pack_key($v);
$mut_map[$v] = array($this->column_family => array($mutation));
}
return $this->pool->call("batch_mutate", $mut_map, $this->wcl($write_consistency_level));
} else return false;
}
//delete name1, name2, name3 from key1, key2 in a single call
$column_family->batch_remove(array(key1, key2), array(name1, name2, name3));