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 QdbHashSet

An unordered set of blob in the database.

QdbEntry
Extended by QdbHashSet
Example:

You get a QdbHashSet instance by calling QdbCluster::hashSet(). Then you can perform atomic operations on the set:

$hashSet = $cluster->hashSet('my hashSet');
$hashSet->insert('value');
$hasValue = $hashSet->contains('value');

Methods summary
public boolean
# contains( string $value )

Tells if a value is present in the set.

Tells if a value is present in the set.

Parameters

$value
The value to look for.

Returns

boolean
true if the value is present in the set; false if not.

Throws

QdbAliasNotFoundException
QdbIncompatibleTypeException

Example

$needMilk = $cluster->hashSet('recipe')->contains('milk');
public boolean
# erase( string $value )

Removes a value from the set.

Removes a value from the set.

Parameters

$value
The value to remove.

Returns

boolean
true if the value was present in the set; false if not.

Throws

QdbAliasNotFoundException
QdbIncompatibleTypeException

Example

$cluster->hashSet('recipe')->erase('butter');
public boolean
# insert( string $value )

Adds the a value in the set. Creates the set if needed.

Adds the a value in the set. Creates the set if needed.

Parameters

$value
The value to add.

Returns

boolean
true if the value was added; false if it was already present in the set.

Throws

QdbIncompatibleTypeException

Example

$cluster->hashSet('recipe')->insert('flour');
Methods inherited from QdbEntry
alias(), attachTag(), detachTag(), getTags(), hasTag(), remove()
Copyright 2009-2017 quasardb SAS Documentation generated by ApiGen