phpcassa是为Apache Cassandra的一个PHP客户端库。 与Cassandra的0.7,0.8,1.0,和1.1兼容 可选C扩展以提高性能 phpcassa兼容PHP5.3+
示例代码:
$pool = new ConnectionPool('Keyspace1', array('localhost')); $users = new ColumnFamily($pool, 'Standard1'); $super = new SuperColumnFamily($pool, 'Super1'); $users->insert('key', array('column1' => 'value1', 'column2' => 'value2')); $users->get('key'); $users->multiget(array('key1', 'key2')); $users->remove('key1'); // removes whole row $users->remove('key1', 'column1'); // removes 'column1' $users->get_count('key1'); // counts the number of columns in row 'key1' $users->get_range('key1', 'key9'); // gets all rows with keys between '1' and '9'