A Cassandra CQL3 client wrapper over phpcassa for Yii
PHP Perl
Switch branches/tags
Nothing to show
Latest commit 7e6f267 May 19, 2013 Mahafuzur Rahman Adding MIT License
Permalink
Failed to load latest commit information.
Thrift first commit May 15, 2013
cassandra first commit May 15, 2013
phpcassa Adding MIT License May 19, 2013
ACassandraConnection.php first commit May 15, 2013
LICENSE Adding MIT License May 19, 2013
README.md Updating ReadMe May 15, 2013
autoload.php first commit May 15, 2013

README.md

Yii Cassandra CQL3 Wrapper

Provides object oriented access to Cassandra using CQL3 in a familiar Yii Style. This project is a wrapper over the famous phpcassa library.

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:

http://stackoverflow.com/questions/16139362/cassandra-is-not-retrieving-the-correct-integer-value

Usage

Configuring The Cassandra Connection

Add this extension inside your extensions directory

Add the following to your application config

"components" => array(
	'cassandra' => array(
	'class' => 'ext.yii-cassandra-cql3.ACassandraConnection',
	'keyspace' => 'YOUR_KEYSPACE',
	'servers' => array('127.0.0.1')
	)
...
)

Querying Cassandra using CQL3

$query_result = Yii::app()->cassandra->cql3_query("Select * from users");
$rows = Yii::app()->cassandra->cql_get_rows($query_result);
print_r($rows);
die;

You can do other queries in similar fashion. For more info see the cql3 reference