GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - thobbs/phpcassa: PHP client library for Apache Cassandra

This repository was archived by the owner on Aug 4, 2020. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

474 Commits
474 Commits

Folders and files

NameName
Last commit message
Last commit date
debian
debian
 
 
doc
doc
 
 
examples
examples
 
 
ext/thrift_protocol
ext/thrift_protocol
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
AUTHORS
AUTHORS
 
 
CHANGES
CHANGES
 
 
INSTALLING
INSTALLING
 
 
LICENSE
LICENSE
 
 
README.mkd
README.mkd
 
 
VERSION
VERSION
 
 
apigen.neon
apigen.neon
 
 
composer.json
composer.json
 
 
phpunit.xml
phpunit.xml
 
 

Repository files navigation

phpcassa

Build Status

phpcassa is a PHP client library for Apache Cassandra.

  • Compatible with Cassandra 0.7 through 1.2
  • Optional C extension for improved performance

phpcassa is compatible with PHP 5.3+

phpcassa is open source under the MIT license.

Deprecated

At this point, phpcassa has been deprecated and will no longer be supported.

I suggest using the DataStax PHP driver located here: https://github.com/datastax/php-driver. It supports CQL, has many excellent features, and is well maintained.

Documentation

While this README includes some useful information, the official and more thorough documentation can be found here:

http://thobbs.github.com/phpcassa

Examples

You can find a few fully working example scripts in the examples/ directory.

Opening Connections

$pool = new ConnectionPool('Keyspace1');

or

$pool = new ConnectionPool('Keyspace1', array('localhost'));

Create a column family object

$users = new ColumnFamily($pool, 'Standard1');
$super = new SuperColumnFamily($pool, 'Super1');

Inserting

$users->insert('key', array('column1' => 'value1', 'column2' => 'value2'));

Querying

$users->get('key');
$users->multiget(array('key1', 'key2'));

Removing

$users->remove('key1'); // removes whole row
$users->remove('key1', 'column1'); // removes 'column1'

Other

$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'

Using the C Extension

The C extension is crucial for phpcassa's performance.

You need to configure and make to be able to use the C extension.

Note: if checkinstall is available, run sudo checkinstall in place of sudo make install.

cd ext/thrift_protocol
phpize
./configure
make
sudo make install

Add the following line to your php.ini file:

extension=thrift_protocol.so

Getting Help

  • Mailing list: phpcassa on google groups
  • IRC: Channel #cassandra on irc.freenode.net

About

PHP client library for Apache Cassandra

thobbs.github.com/phpcassa

Resources

Readme
MIT license
Activity

Stars

247 stars

Watchers

1 watching

Forks

76 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.