Introduction
Welcome to quasardb API for PHP
Interfacing with a quasardb database from a PHP program is extremely straightforward, just create a qdb\QdbCluster and perform the operations.
$cluster = new QdbCluster('qdb://127.0.0.1:2836');
OK, now that we have a connection to the database, let's store some binary data::
$blob = $cluster->blob('Bob the blob'); $blob->put('firstValue'); $blob->update('secondValue'); $value = $blob->get();
Quasardb provides concurrent double-ended queue, or "deque"
$queue = $cluster->deque('Andrew the queue'); $queue->pushBack('firstValue'); $queue->pushBack('secondValue'); $value = $queue->popFront();
quasardb comes out of the box with server-side atomic integers:
$integer = $cluster->integer('Roger the integer'); $integer->put(42); $total = $integer->add(12);
Here's how you can easily find your data, using tags:
$cluster->blob('Bob the blob')->attachTag('Male'); $cluster->integer('Roger the integer')->attachTag('Male'); $males = $cluster->tag('Male')->getEntries();
The source code of this library can be found on GitHub.