Commit Graph

1 Commits

Author SHA1 Message Date
Daniele Alessandri 7028082b7f Implement PHP iterator based on the SSCAN command (Redis 2.8).
This iterator allows to perform full iterations over the members of a set
by wrapping the incremental nature of SSCAN just like we did for SCAN:

  $client = new Predis\Client('tcp://127.0.0.1', ['profile' => '2.8']);
  $iterator = new Predis\Iterator\Scan\SetIterator($client, "set_key");

  foreach ($iterator as $member) {
      echo $member . PHP_EOL;
  }

Being SSCAN closely related to SCAN, it is subject to the same behaviour,
see http://redis.io/commands/scan for reference.

Meh
2013-11-03 14:19:06 +01:00