phpcassa icon indicating copy to clipboard operation
phpcassa copied to clipboard

Elegant Cassandra PHP client with TimeUUID and SuperColumnFamily support (port of pycassa)

Notes:

  • Compatible with Cassandra 0.5.1 upwards (0.6.1)
  • Direct port of pycassa
  • Basic conversion of types (UUIDs to strings)

Examples:

  • Including files:
  • Setting up nodes:
  • Create a column family object
  • Inserting:
insert('1', array('email' => '[email protected]', 'password' => 'test')); ?>
  • Querying:
get('1'); // array('email' => '[email protected]', 'password' => 'test') $users->multiget(array('1', '2')); // array('1' => array('email' => '[email protected]', 'password' => 'test')) ?>
  • Removing:
remove('1'); // removes whole object $users->remove('1', 'password'); // removes 'password' field ?>
  • Other:
get_count('1'); // counts the number of columns in user 1 (in this case 2) $users->get_range('1', '10'); // gets all users between '1' and '10' ?>

Email [email protected] with any questions. We also have a google group to ask questions:

http://groups.google.com/group/phpcassa

AUTHORS: