dev-master
9999999-devA Cassandra CQL3 client wrapper over phpcassa for Yii 2
MIT
The Requires
by Dima Beliy
extension yii2 cassandra phpcassa
A Cassandra CQL3 client wrapper over phpcassa for Yii 2
Phpcassa has been deprecated and will no longer be supported! Please use https://github.com/datastax/php-driver, (*1)
A Cassandra CQL3 client wrapper over phpcassa for Yii 2, (*2)
Provides object oriented access to Cassandra using CQL3 in a familiar Yii Style. This project is a wrapper over the famous phpcassa library., (*3)
This extension also handles issues with the phpcassa library 'Data Types' while using the latest CQL3 API provided by cassandra. The following discussion on StackOverflow describes the problem:, (*4)
http://stackoverflow.com/questions/16139362/cassandra-is-not-retrieving-the-correct-integer-value, (*5)
The preferred way to install this extension is through composer., (*6)
Either run, (*7)
php composer.phar require --prefer-dist beliy/yii2-cassandra-cql "*"
or, (*8)
composer require beliy/yii2-cassandra-cql:dev-master
or add, (*9)
"beliy/yii2-cassandra-cql": "*"
to the require section of your composer.json
file., (*10)
'components' => [ ... 'cassandra' => [ 'class' => '\beliy\cassandra\Connection', 'keyspace' => 'youkeyspace', 'servers' => ['127.0.0.1', ...], ], 'cache' => [ 'class' => '\beliy\cassandra\Cache', 'tableName' => 'cache', // dedault 'cache' 'tablePrefix' => 'mega', // default '' ], ... ] $cass = Yii::$app->cassandra; $cql = 'SELECT value FROM yourtable WHERE id=1'; $query_result = $cass->cql3Query($cql); $rows = $cass->cqlGetRows($query_result); Usage for cache: First you may init column fammily storage fro cache. $cache = Yii::$app->cache; $cache->createTable(); Than use standart Yii2 Cache APIs.
REQUIREMENTS, (*11)
Yii 2.0.3 / PHP 5.5+, (*12)
Resources, (*13)
Fork extensions from http://www.yiiframework.com/extension/cassandra-cql, (*14)
External Projects used in this extension is the phpcassa library for PHP and Cassandra https://github.com/thobbs/phpcassa, (*15)
A Cassandra CQL3 client wrapper over phpcassa for Yii 2
MIT
extension yii2 cassandra phpcassa