Apache Cassandra的PHP客戶端庫:phpcassa

jopen 11年前發布 | 21K 次閱讀 Cassandra Apache Cassandra NoSQL數據庫

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'

項目主頁:http://www.baiduhome.net/lib/view/home/1371187292992

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!