phpcassaCassandra 的 PHP 客户端库

联合创作 · 2023-09-30 19:27

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'

 

浏览 15
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报