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

Class QdbBatchResult

A result of a batch query.

A QdbBatchResult is returned by QdbCluster::runBatch().

This class behaves like an array containing the operation results. Operations results are stored in the order in which operations have been added to the QdbBatch, which is not necessarily the order in which operation are executed in the cluster.

An exception will be thrown when reading the result of an operation that failed. The exception type will match the failure of that particular operation, like QdbAliasAlreadyExistsException, QdbAliasNotFoundException, QdbContainerEmptyException or QdbIncompatibleTypeException.

QdbBatchResult implements ArrayAccess, Countable
Example:
// first, prepare the batch
$batch = new QdbBatch();
$batch->put('key 0', 'value 0');
$batch->put('key 1', 'value 1');
$batch->get('key 2');

// then, execute it
$result = $cluster->runBatch($batch);

// finally, read the results
// (the following line may throw QdbAliasNotFoundException or QdbIncompatibleTypeException)
$value2 = $result[2];

Methods inherited from ArrayAccess
offsetExists(), offsetGet(), offsetSet(), offsetUnset()
Methods inherited from Countable
count()
Copyright 2009-2017 quasardb SAS Documentation generated by ApiGen