Commit Graph

154 Commits

Author SHA1 Message Date
Daniele Alessandri ee9868c123 Instead of passing around the actual socket resource, pass the Connection instance as argument. 2010-03-11 11:23:35 +01:00
Daniele Alessandri ce00cb14b9 Bugfix: the response parser for KEYS raises a E_WARNING when using iterators for multi bulk responses against Redis v2.0. 2010-03-10 23:45:04 +01:00
Daniele Alessandri daf6dbd7c2 // TODO stuff. 2010-03-10 18:48:32 +01:00
Daniele Alessandri c95125bae1 Allow a null parameters argument for the ConnectionParameters constructor (set to default). 2010-03-10 11:44:22 +01:00
Daniele Alessandri 53970bd006 Constants defined for Redis reply types in ResponseReader. 2010-03-10 11:27:28 +01:00
Daniele Alessandri 3b150d4d86 Get ResponseReader options values. 2010-03-10 11:18:25 +01:00
Daniele Alessandri 52a1c06ac2 New command: ZINTER (Redis v2.0-dev). 2010-03-09 16:43:23 +01:00
Daniele Alessandri b21b6f8029 New command: ZUNION (Redis v2.0-dev). 2010-03-09 16:41:32 +01:00
Daniele Alessandri fa62b75b9a New command: ZREMRANGEBYRANK (Redis v2.0-dev). 2010-03-09 16:37:54 +01:00
Daniele Alessandri 52815adc0f New command: ZREVRANK (Redis v2.0-dev). 2010-03-09 16:33:03 +01:00
Daniele Alessandri 38e8c94f8b Enhancement: set how to handle errors returned by the server (throw a ServerException or return a ResponseError instance that holds the error message). 2010-03-09 16:01:33 +01:00
Daniele Alessandri c281891641 Enhancement: set how to handle multibulk replies (fetch the whole reply or stream it down to the user code). 2010-03-09 15:48:41 +01:00
Daniele Alessandri 425c9ade31 Fixed internal API divergences between the two merged branches. 2010-03-09 15:19:22 +01:00
Daniele Alessandri d03c7c42b2 Merge branch 'multibulk_streaming_new'
Conflicts:
	lib/Predis.php
2010-03-09 14:57:38 +01:00
Daniele Alessandri 9086cfc284 Merge branch 'response_reader' into integration 2010-03-09 14:53:53 +01:00
Daniele Alessandri d8b0c7f40c Reverting some obsoleted changes in preparation for a merge into the master branch. 2010-03-09 14:47:15 +01:00
Daniele Alessandri 51c7ef4566 Get the current ResponseReader associated to a Connection instance. 2010-03-09 14:07:41 +01:00
Daniele Alessandri 84ea64a9ee Enhanchement: added the ability to set options on a ResponseReader instance. 2010-03-09 14:06:10 +01:00
Daniele Alessandri e04ed827d4 Get the current ResponseReader associated to a Client instance. 2010-03-09 13:00:43 +01:00
Daniele Alessandri 011d544d06 Fixed a small oversight. 2010-03-09 12:44:37 +01:00
Daniele Alessandri c6f97a7946 New commands: HSET and HGET (Redis v2.0-dev). NOTE: this is the beginning of the Hashes awesomeness in Redis! 2010-03-06 09:30:37 +01:00
Daniele Alessandri 46d2344d42 Renamed \Predis\Commands\ZCount to \Predis\Commands\ZSetCount for naming consistency. 2010-03-04 12:17:09 +01:00
Daniele Alessandri 28bac3b3b0 New command: ZRANK (Redis v2.0-dev). 2010-03-04 12:16:14 +01:00
Daniele Alessandri 0b229a5057 New command: SUBSTR (Redis v2.0-dev). 2010-03-04 12:12:10 +01:00
Daniele Alessandri 460dfce7f6 Minor code rearrangements. 2010-03-04 11:58:19 +01:00
Daniele Alessandri 03ce35f5d9 Enhancement: added support for DISCARD in a MULTI / EXEC context initialized inside of an instance of MultiExecBlock. 2010-03-02 17:15:49 +01:00
Daniele Alessandri c325707559 New command: DISCARD (Redis v2.0-dev). 2010-03-02 16:49:15 +01:00
Daniele Alessandri e114f86d64 Predis\Commands\Keys has been adjusted to handle the change in its reply type in a backwards-compatible way (the KEYS command will return a multibulk reply starting from Redis 2.0). 2010-03-02 16:47:18 +01:00
Daniele Alessandri 8a79343f12 Private utility method ResponseReader->setHandler. 2010-03-01 18:52:34 +01:00
Daniele Alessandri f0d5dad2c1 Non-static response reader 2010-03-01 12:22:39 +01:00
Daniele Alessandri 6e5c495b26 MultiBulkResponseIterator and MultiBulkResponseKVIterator inherit from a common MultiBulkResponseIteratorBase class. 2010-02-27 12:44:36 +01:00
Daniele Alessandri f65cb529ec Enhancement: when using multibulk response iterators, ZRANGE and ZSETRANGE now return a MultiBulkResponseKVIterator when called with the WITHSCORES parameter. 2010-02-27 11:52:14 +01:00
Daniele Alessandri 47db5075ec Implemented MultiBulkResponseKVIterator to wrap iterators that should be seen as $k => array($MBIterator, $MBIterator++) by external code (think of ZRANGE .. WITHSCORES as a practical example). 2010-02-27 11:46:52 +01:00
Daniele Alessandri 7f8ba42717 Enhancement: ZRANGEBYSCORE now handles the WITHSCORES (Redis v2.0-dev) just like ZRANGE and ZREVRANGE. 2010-02-27 10:54:42 +01:00
Daniele Alessandri ad540776ac New command: ZCOUNT (Redis v2.0-dev). 2010-02-27 10:39:47 +01:00
Daniele Alessandri 90d7b252ae New command: APPEND (Redis v2.0-dev). 2010-02-27 10:31:57 +01:00
Daniele Alessandri 21abe8bf02 Enhancement: connections can now be identified by an alias (useful when connected to a cluster of Redis servers). 2010-02-27 09:43:49 +01:00
Daniele Alessandri 806ef6058d Increased the default connection timeout from 2 to 5 seconds and moved the initialization of its value in ConnectionParameters->filterConnectionParams. 2010-02-26 23:22:13 +01:00
Daniele Alessandri e229153800 Use instanceof instead of the deprecated is_a(). 2010-02-26 23:04:42 +01:00
Daniele Alessandri ee5e978a6c Enhancement: allows method chaining with multi-exec blocks. 2010-02-26 22:47:39 +01:00
Daniele Alessandri dac4d87a60 Bugfix: the pipeline command buffer is not correctly reinitialized after CommandPipeline->flushPipeline. 2010-02-26 22:42:09 +01:00
Daniele Alessandri 47d34531e3 Enhancement: allows method chaining with commands pipelines. 2010-02-26 22:30:57 +01:00
Daniele Alessandri 0cd7b446c6 Users can now choose at runtime how to handle multibulk responses. The new (and optional) iterator-based approach is slightly slower than the usual fetch-all behaviour, but in certain scenarios (e.g. when dealing with massive multibulk responses) it can save a lot of memory on the client. 2010-02-25 12:46:10 +01:00
Daniele Alessandri 8df4eaf7b3 Predis\Client::multiExec is now aware of iterable multi-bulk responses. 2010-02-25 12:44:13 +01:00
Daniele Alessandri 701e06443c Ensure that iterators returned by multi-bulk replies inside a pipeline are stored in the replies buffer as arrays. 2010-02-25 12:43:16 +01:00
Daniele Alessandri a1aaf73b78 MultiBulkResponseIterator now implements the Countable interface. 2010-02-25 12:41:57 +01:00
Daniele Alessandri b7203d97e7 MultiBulkResponseIterator::current must be pre-fetched. 2010-02-25 12:41:19 +01:00
Daniele Alessandri a4720dc721 Implemented the new Predis\Utilities\MultiBulkResponseIterator. 2010-02-25 12:40:15 +01:00
Daniele Alessandri 4ee965ab83 Switched from anonymous functions to classes extending the IResponseHandler interface to handle server responses. 2010-02-25 11:28:14 +01:00
Daniele Alessandri 6e3b1c835d Enhancement: support multiple GET parameters for the SORT command (see also my comment in ISSUE #1) 2010-02-25 10:57:41 +01:00