Quasardb API for PHP
Introduction Installation Compilation Configuration API Reference

Classes

  • QdbBatch
  • QdbBatchResult
  • QdbBlob
  • QdbCluster
  • QdbDeque
  • QdbEntry
  • QdbEntryCollection
  • QdbExpirableEntry
  • QdbHashSet
  • QdbInteger
  • QdbTag
  • QdbTagCollection

Exceptions

  • QdbAliasAlreadyExistsException
  • QdbAliasNotFoundException
  • QdbConnectionException
  • QdbContainerEmptyException
  • QdbException
  • QdbIncompatibleTypeException
  • QdbInputException
  • QdbOperationDisabledException
  • QdbOperationException
  • QdbProtocolException
  • QdbSystemException

Introduction

Welcome to quasardb API for PHP

Interfacing with a quasardb database from a PHP program is extremely straightforward, just create a 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);

We also provide distributed sets.

$set = $cluster->hashSet('Janet the set');

$set->insert('value');
$set->erase('value');
$hasValue = $set->contains('value');

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 by found on GitHub.

See: QdbBlob, QdbHashSet, QdbInteger, QdbDeque, QdbTag
Copyright 2009-2017 quasardb SAS Documentation generated by ApiGen