1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60:
<?php
/**
* An unordered set of blob in the database.
*
* @example
* You get a `QdbHashSet` instance by calling {@link \QdbCluster::hashSet()}.
* Then you can perform atomic operations on the set:
* <code>
* $hashSet = $cluster->hashSet('my hashSet');
* $hashSet->insert('value');
* $hasValue = $hashSet->contains('value');
* </code>
*/
class QdbHashSet extends QdbEntry
{
/**
* Tells if a value is present in the set.
*
* @example
* <code>
* $needMilk = $cluster->hashSet('recipe')->contains('milk');
* </code>
*
* @param string $value The value to look for.
* @return bool `true` if the value is present in the set; `false` if not.
* @throws QdbAliasNotFoundException
* @throws QdbIncompatibleTypeException
*/
function contains($value);
/**
* Removes a value from the set.
*
* @example
* <code>
* $cluster->hashSet('recipe')->erase('butter');
* </code>
*
* @param string $value The value to remove.
* @return bool `true` if the value was present in the set; `false` if not.
* @throws QdbAliasNotFoundException
* @throws QdbIncompatibleTypeException
*/
function erase($value);
/**
* Adds the a value in the set. Creates the set if needed.
*
* @example
* <code>
* $cluster->hashSet('recipe')->insert('flour');
* </code>
*
* @param string $value The value to add.
* @return bool `true` if the value was added; `false` if it was already present in the set.
* @throws QdbIncompatibleTypeException
*/
function insert($value);
}
?>