Daniele Alessandri
4bc6f588fc
Bump version in files for release.
2012-06-01 11:17:31 +02:00
Daniele Alessandri
2522a249f3
Minor CS fixes.
2012-06-01 11:16:34 +02:00
Daniele Alessandri
b4e1cfcee7
Update CHANGELOG.
2012-06-01 11:15:47 +02:00
Daniele Alessandri
105bf8a2ee
Merge remote-tracking branch 'inadarei/v0.7' into v0.7
2012-05-27 20:56:51 +02:00
Irakli Nadareishvili
4f16e232a8
Updated file_exists() to is_file() and changed require_once() to require() per Predis' author's suggestions
2012-05-26 08:14:29 -03:00
Irakli Nadareishvili
703c3ceb90
Making autoloader act nicer to autoloaders that may be running in parallel
2012-05-22 13:39:44 -03:00
Daniele Alessandri
ca2e4aa4a1
Update CHANGELOG.
...
[ci skip]
2012-05-17 17:33:21 +02:00
Daniele Alessandri
477056b862
For some reason, class and tests for BITCOUNT were missing...
2012-05-17 16:52:21 +02:00
Daniele Alessandri
b94e002e90
TIME can be considered a read-only command in MASTER / SLAVE.
2012-05-17 16:37:26 +02:00
Daniele Alessandri
3aff21f8cc
New commands: BITOP, BITCOUNT (Redis v2.6-dev).
2012-05-17 16:34:50 +02:00
Daniele Alessandri
1e142a63e6
Fix comment in package.ini.
...
[ci skip]
2012-05-17 09:52:46 +02:00
Daniele Alessandri
b67dab9ab1
Fix Predis\Commands\ServerEvalSHA::getScriptHash().
...
"Predis\Commands\ServerEvalSHA::getScriptHash()" was calculating the hash
while it just needs to return the first argument of the command.
2012-04-28 01:25:17 +02:00
Daniele Alessandri
6ba1890da9
Do not assume that the position of a MultiBulkResponse iterator is 0.
2012-04-27 16:10:58 +02:00
Daniele Alessandri
ca8ba35fb5
Switch to master inside executor when pipelining in replication mode.
...
The actual code to switch to master has been implemented only in the
standard and the fire-and-forget executor classes since it does not
make sense to have it in special executors used exclusively when in
client-side clustering mode.
2012-04-25 11:53:08 +02:00
Daniele Alessandri
5af2b628f1
Scripting abstraction can use negatives to calculate number of keys.
...
With a negative number Predis will count from the end of the arguments list
to calculate the actual number of keys that will be interpreted as elements
for `KEYS` by the underlying `EVAL` command.
2012-04-25 11:20:57 +02:00
Daniele Alessandri
f4c58b926b
Fix example for custom distribution strategy.
...
See ISSUE #63 for details.
2012-04-13 11:51:02 +02:00
Daniele Alessandri
cb390cf292
Back to development for the next patch release.
2012-04-13 11:49:30 +02:00
Daniele Alessandri
74cc0e3225
Bump version in files for release.
2012-04-01 10:09:20 +02:00
Daniele Alessandri
b5ae1b9a2b
Update README.
2012-03-31 11:58:38 +02:00
Daniele Alessandri
31c47362fb
Add a couple of paragraphs in the FAQ.
2012-03-31 11:29:59 +02:00
Daniele Alessandri
871f1a3a1d
Update TODO.
2012-03-31 10:45:16 +02:00
Daniele Alessandri
ba0338e3d8
Update CHANGELOG.
2012-03-31 10:44:29 +02:00
Daniele Alessandri
a7c906ab4c
Apparently the next major version or Redis will be 2.8.
2012-03-31 10:43:50 +02:00
Daniele Alessandri
7675bb040a
Make it possible to prepend the autoloader.
2012-03-19 11:31:39 +01:00
Daniele Alessandri
930af24c7f
Make Predis\Autoloader faster.
2012-03-18 18:00:00 +01:00
Daniele Alessandri
23ed563e45
Add missing tests for Predis\Profiles\ServerProfile::defineCommand().
2012-03-18 12:58:19 +01:00
Daniele Alessandri
f00bf6443d
Update CHANGELOG.
...
[ci skip]
2012-03-11 14:01:49 +01:00
Daniele Alessandri
6d73f4a538
Promote 2.6 as an independent server profile for Redis 2.6.
...
The development server profile now targets Redis 3.0.
2012-03-11 13:53:28 +01:00
Daniele Alessandri
f0f3d7814c
Fix MONITOR and Predis\MonitorContext with Redis 2.6.
...
Starting with 2.6, Redis uses a slightly different format for the payload
returned by MONITOR for each command. Predis can now adapt to this difference
and returns a new `client` field in the payload object. This new field is
always defined but is set to NULL when connected to Redis < 2.6.
Please note that Redis 2.6 now does not echo the `MONITOR` command as the
first payload when opening a new MONITOR context.
2012-03-11 13:30:30 +01:00
Daniele Alessandri
5c2704c9d4
Add a not about MONITOR failing the test with Redis unstable.
2012-03-07 13:04:28 +01:00
Daniele Alessandri
effefcee34
New command: TIME (Redis v2.6-dev).
2012-03-07 12:30:39 +01:00
Daniele Alessandri
86bf223ec0
Enable integration tests for Redis commands on Travis CI.
...
This was not possible before since our test suite requires Redis >= 2.4 but
their environment was running Redis 2.2 until a month ago or so.
2012-02-25 11:04:31 +01:00
Daniele Alessandri
46d293a716
Fix phpdocs.
...
[ci skip]
2012-01-14 23:35:39 +01:00
Daniele Alessandri
fcd41a4787
Fix CHANGELOG.
2012-01-14 23:33:39 +01:00
Daniele Alessandri
8dc9450f39
Bump year in LICENSE.
...
[ci skip]
2012-01-14 15:29:12 +01:00
Daniele Alessandri
6ad522f492
Update CHANGELOG.
2012-01-14 15:11:27 +01:00
Daniele Alessandri
317fb6c398
Make Predis\Network\MasterSlaveReplication serializable.
...
Since PHP cannot serialize closures we switched to a private method to check
if a SORT command is a read-only operation, but closures are still supported
even if they will make the connection unserializable.
2012-01-14 14:53:52 +01:00
Daniele Alessandri
93163bdfb3
Make it possible to serialize and unserialize connection instances.
2012-01-14 14:53:47 +01:00
Daniele Alessandri
626520b836
Add specific server profile alias for Redis 2.6.
2012-01-14 13:01:38 +01:00
Daniele Alessandri
aaea628c55
Back to development for the next patch release.
2012-01-14 12:51:01 +01:00
Daniele Alessandri
135fd5004b
Bump VERSION and update CHANGELOG.
2011-12-27 16:19:23 +01:00
Daniele Alessandri
c25a815317
Update README.
2011-12-27 15:57:12 +01:00
Daniele Alessandri
39a9fc2ddd
Add a new example for complex replication configuration.
2011-12-27 12:34:44 +01:00
Daniele Alessandri
f5bca54bba
Fix CHANGELOG.
2011-12-27 10:40:29 +01:00
Daniele Alessandri
364aa180f9
Use Predis\NotSupportedException for unsupported connection parameters.
2011-12-27 10:38:06 +01:00
Daniele Alessandri
4da506cd9e
Track changes in Onion.
2011-12-24 19:03:13 +01:00
Daniele Alessandri
ef5034dc72
Update CHANGELOG.
...
[ci skip]
2011-12-24 12:17:03 +01:00
Daniele Alessandri
994f045a4a
Add a method to execute instances of Redis commands in a transaction.
2011-12-24 12:08:34 +01:00
Daniele Alessandri
8cd8d4e580
Fix broken scripted commands when all arguments are considered keys.
2011-12-21 23:14:46 +01:00
Daniele Alessandri
22f1aafae8
Fix example of replication.
2011-12-21 21:41:51 +01:00
Daniele Alessandri
c47b009b69
Update documentation for master / slave replication.
2011-12-21 21:33:30 +01:00
Daniele Alessandri
2cff6f0886
Merge branch 'replication' into v0.7
...
See ISSUE #21 for history and details about transparent master / slave
replication support in Predis.
2011-12-21 21:25:56 +01:00
Daniele Alessandri
63cb150fc2
Switch to the master server right before the execution of a pipeline.
...
This is actually a temporary solution since we should be using a dedicated
pipeline executor to handle the master/slave replication connection.
Ideally we should stick with a slave if no write operations are present in
the buffer, but forcing a switch to the master connection is the easiest
solution for now and users can still create a new client instance from one
of the slaves when they are sure that their pipelines contain read-only
operations.
2011-12-21 21:15:46 +01:00
Daniele Alessandri
466c666547
Add example for master / slave replication.
2011-12-21 21:01:48 +01:00
Daniele Alessandri
8d5c794efe
[tests] Add more tests for Predis\Network\MasterSlaveReplication.
2011-12-21 18:34:53 +01:00
Daniele Alessandri
e3fba5d4b7
[tests] Add more tests for Predis\Network\MasterSlaveReplication.
2011-12-21 16:50:03 +01:00
Daniele Alessandri
a8400f2ed8
Rename default replication class to Predis\Network\MasterSlaveReplication.
2011-12-21 16:50:03 +01:00
Daniele Alessandri
44629a33db
[tests] Add tests for Predis\Network\PredisReplication.
2011-12-21 16:50:01 +01:00
Daniele Alessandri
d38f164d3f
Minor fixes in documentation.
2011-12-21 11:26:26 +01:00
Daniele Alessandri
9bc5685959
Make the "profile" option accept a callable object as initializer.
...
This can be useful to set up the profile with additional commands,
e.g. when injecting new "virtual" commands based upon the EVAL and
the Predis\Commands\ScriptedCommand class.
2011-12-21 10:56:10 +01:00
Daniele Alessandri
565690a5b1
Disallow certain commands when in replication mode.
...
Some of these commands do not actually pose any threat, but their replies can
be misleading since users do not know on which server they are connected to.
We prefer to make things explicit so users can get a new client object out of
a specific connection in the replication pool to issue these commands.
2011-12-20 12:10:06 +01:00
Daniele Alessandri
bdbbe18e6c
Add the ability to get a connection by alias from aggregated connections.
...
Previously it was possible to create a new instance of Predis\Client using
the alias of a single connection in a cluster of connections. Now we added
the ability to do this also when using master/slave replication.
2011-12-18 15:07:21 +01:00
Daniele Alessandri
78027f0498
Use our own channel to distribute Predis via PEAR instead of PearHub.
...
The new PEAR channel is self-hosted using Pirum.
2011-12-18 13:28:45 +01:00
Daniele Alessandri
104cd1eae7
Use Onion to build PEAR packages of Predis.
...
Since Pearhub is currently broken (unfortunately the project does not seem to
be actively mantained anymore) but we still want to have PEAR packages for our
library, we need to automate the creation of a package.xml definition file to
build the actual packages that will be uploaded on a self-hosted PEAR channel.
Onion, while still in its alpha stage right now, works perfectly fine for our
needs and its own package.ini file looks simple enough to edit and maintain.
See http://c9s.github.com/Onion for more details about Onion and thank @c9s
for making it available.
2011-12-18 12:50:10 +01:00
Daniele Alessandri
5148ce16c6
Add the ability to mark specific commands or scripts for EVAL as read-only.
...
As suggested by @Seldaek in ISSUE #21 , it would be desiderable to have the
ability to mark certain scripts for EVAL (and EVALSHA) as read-only to avoid
switching to the master server when this is not really needed.
When marking a script as read-only, only its SHA1 hash is saved to use less
memory and to make this work transparently for both EVAL and EVALSHA.
2011-12-17 10:58:37 +01:00
Daniele Alessandri
4b9ab0bcce
Revert to development version for the next patch release.
...
Forgot to do this early. [ci skip]
2011-12-16 22:04:21 +01:00
Daniele Alessandri
39ed8e3e8f
Fix wrong usage of single-quotes for a string expecting interpolation.
2011-12-16 20:36:01 +01:00
Daniele Alessandri
6f4347010d
Add new "replication" client option for master / slave replication.
...
When the "replication" option is specified and evaluates to true, the array of
connection parameters passed to the client constructor os be used to initialize
a new instance of Predis\Network\IConnectionReplication. This option can also
accept a callable object used as an initializer or the fully-qualified name of
a class.
2011-12-16 19:30:07 +01:00
Daniele Alessandri
c43278eceb
Implement support for master / slave replication configurations.
...
We used a new kind of virtual connection that, just like with cluster, groups
multiple connection objects and handles the logic needed to switch among them
depending on the kind of operation performed by commands..
Our default implementation starts by picking up a random slave and switches to
the master as soon as a command performing a write operation against a key is
detected. The master server will then be used for all the subsequent requests
unless a manual switch to a different connection object is performed.
Redis transactions are always performed on the master server, which means that
the switch to master is done as soon as the client issues a WATCH, MULTI or
any other command related to transactions.
See also https://github.com/nrk/predis/issues/21 for more details.
2011-12-16 16:28:36 +01:00
Daniele Alessandri
5561ce6bd3
Bump VERSION and update CHANGELOG.
...
Guess what time is it? Yes it is release time!
2011-12-11 17:24:01 +01:00
Daniele Alessandri
6730661b4a
[tests] Use a custom phpunit.xml file for TravisCI.
...
TravisCI environmenti run Redis 2.2 but we need Redis 2.4 to run the
integration tests in the test suite. For now we have simply disabled
the `connected` group of tests using a custom phpunit.xml file, we will
see later if it is worth building Redis on the fly with a `before_script`
directive in .travis.yml or just wait for a a new version of Redis to
be deployed on their VM images.
2011-12-11 17:15:23 +01:00
Daniele Alessandri
4e0c09a3cf
Fix E_STRICT error messages.
2011-12-11 16:57:47 +01:00
Daniele Alessandri
71aad42534
Update README and CHANGELOG.
2011-12-11 16:43:42 +01:00
Daniele Alessandri
25b7d72fc9
Make it possible to remove connections from a cluster.
2011-12-11 14:06:32 +01:00
Daniele Alessandri
0f88225104
[tests] Rename the realm-network-webdis group to realm-webdis.
2011-12-11 13:33:37 +01:00
Daniele Alessandri
8be921cb66
Minor changes to README.
2011-12-11 13:20:09 +01:00
Daniele Alessandri
e12d80b67f
Minor fixes to CHANGELOG.
2011-12-11 13:11:56 +01:00
Daniele Alessandri
8984af1201
Minor changes in comments.
2011-12-11 12:50:27 +01:00
Daniele Alessandri
dc9bd4e3a3
Add notice in the example of servers-side scripting with Lua.
2011-12-11 12:41:38 +01:00
Daniele Alessandri
2c4073ecab
Prepare CHANGELOG.
2011-12-11 12:36:48 +01:00
Daniele Alessandri
1d6d0f3555
Rename IOption::validate() to IOption::filter().
2011-12-11 11:07:29 +01:00
Daniele Alessandri
efdc16476d
Remove explicit versioning from composer.json and add minor changes.
2011-12-11 11:07:29 +01:00
Daniele Alessandri
469d5127aa
Update READMEs.
2011-12-11 11:07:23 +01:00
Daniele Alessandri
9dcabc3264
Make it possible to use any type of callable to execute a transaction.
2011-12-11 09:34:41 +01:00
Daniele Alessandri
6e13a8af44
[tests] Add tests for OOB commands inside a pipeline context.
2011-12-11 09:33:00 +01:00
Daniele Alessandri
58e61ae1ca
Support for redis-cluster has been postponed to Predis v0.8.
...
The reason is pretty simple: redis-cluster will not be available in a stable
release of Redis anytime soon, so there is no reason to wait anymore to get
it supported in Predis v0.7.
2011-12-10 15:37:43 +01:00
Daniele Alessandri
ab1aeb3c01
Remove BETA from repository.
2011-12-10 15:35:45 +01:00
Daniele Alessandri
1e8446ef63
Update README.
2011-12-10 15:32:15 +01:00
Daniele Alessandri
371ac91777
[tests] Rewrite the whole test suite to allow more granular testing.
...
Fix also a few bugs found while rewriting the test suite.
In order to be able to run integration tests, the test suite requires
a version of Redis >= 2.4.0.
The units have been splitted into several different groups using
PHPUnit @group annotation to allow developers to enable, disable
and combine certain types of tests. The available groups are:
- disconnected: can run without a Redis server online
- connected: active connection to a Redis server is required
- commands: test dedicated to a specific Redis command
- slow: performs operations that can slow down execution;
A list of the available groups can be obtained by running
phpunit --list-groups
Groups of tests can be disabled or enabled via the XML configuration
file or the standard command-line test runner. Please note that due
to a bug in PHPUnit, older versions ignore the --group option when
the group is excluded in the XML configuration file. Please refer to
http://github.com/sebastianbergmann/phpunit/issues/320 for details
Integration tests in the @connected group check if the command being
tested is defined in the selected server profile (see the value of
the TEST_SERVER_VERSION constant in phpunit.xml). If the command is
not defined in the target server profile, the integration test is
automatically marked as skipped.
We also provide an helper script in the bin directory that can be
used to automatically generate a file with the scheleton of a test
case for a Redis command by specifying the name of the class in the
Predis\Commands namespace. For example, to generate a test case for
SET (represented by the Predis\Commands\StringSet class):
./bin/generate-command-test.php --class=StringSet
The realm of a command is automatically inferred from the name of the
class, but it can be set using the --realm option.
2011-12-10 15:26:00 +01:00
Daniele Alessandri
dd20e8557f
Pass the client options to the internal cluster initializer method.
...
This change is useless right now, but when Predis will support Redis cluster
we will need to have access the connection factory object since it will be
required by our future RedisCluster class.
2011-12-02 15:12:47 +01:00
Daniele Alessandri
fae8a79cf2
Fix docs after rename of the executable files in bin/.
2011-12-02 10:15:21 +01:00
Daniele Alessandri
da25d6b6ff
Fix wrong method visibility.
2011-12-01 23:25:31 +01:00
Daniele Alessandri
cad5d16eae
Handle key prefixing in a completely different way.
...
When we will have PHP 5.4 going mainstream and Predis will drop support for
PHP 5.3, we will be able to rely in traits to semplify code and reuse more.
2011-12-01 22:52:11 +01:00
Daniele Alessandri
a910807666
Make it possible to use any kind of callable for PUB/SUB callbacks.
2011-12-01 21:21:22 +01:00
Daniele Alessandri
d81346641f
Make it possible to get the client instance used by a pipeline object.
2011-12-01 20:42:37 +01:00
Daniele Alessandri
1b3478ec2e
Rename files in the bin/ directory.
2011-12-01 19:05:12 +01:00
Daniele Alessandri
9ab18ff2b4
Fix fields serialization of the connection parameters class.
...
This was broken by a recent commit.
2011-12-01 18:52:05 +01:00
Daniele Alessandri
2babb8744a
Minor code formatting changes.
2011-12-01 16:53:35 +01:00
Daniele Alessandri
d9b95d0bc7
Remove useless backslash in the FQN of server profiles.
2011-12-01 16:33:14 +01:00
Daniele Alessandri
d79ff39882
Add missing parameters in the phpdocs of PipelineContext.
2011-12-01 15:36:12 +01:00
Daniele Alessandri
559c5097cd
Add the ability to discard the commands queued in a pipeline object.
2011-12-01 15:34:45 +01:00
Daniele Alessandri
367ca6e31e
Fix mistype in the ServerEval class.
2011-12-01 14:50:34 +01:00
Daniele Alessandri
4a8c678561
Change how the key prefix processor is initialized.
...
When the argument of 'profile' is an instance of Predis\Profiles\IServerProfile
the value of the 'prefix' option is ignored, which means that it is up to the
user to initialize the appropriate prefix processor.
2011-12-01 14:42:58 +01:00
Daniele Alessandri
a5bf0eb41a
Partially rewrite the client options bits and remove some madness.
...
The concept is now similar to a little dependency-injection system.
2011-12-01 12:26:07 +01:00
Daniele Alessandri
1ae30d62db
Returns the SHA1 hash of a Lua script from instances of ServerEval.
2011-12-01 08:49:42 +01:00
Daniele Alessandri
64119bb4a0
Do not use different methods to initialize socket for the PhpiredisConnection.
2011-12-01 08:43:34 +01:00
Daniele Alessandri
1d635c370f
Change the visibility of certain methods in the client class.
2011-11-29 17:56:58 +01:00
Daniele Alessandri
1260c91f63
Pass the server profile to a connection initializer callback.
2011-11-29 17:17:08 +01:00
Daniele Alessandri
728afe7fcb
Redesign how Predis\ConnectionFactory works and make more sense out of it.
2011-11-29 16:32:37 +01:00
Daniele Alessandri
058e11257b
Add phpunit.xml to the list of files ignored by git.
...
The only configuration file for PHPUnit that we want to track using git is
phpunit.xml.dist since phpunit.xml is intended for user customizations of
the test suite.
2011-11-28 10:26:55 +01:00
Daniele Alessandri
31bd53b1ed
Update README.
2011-11-28 10:21:19 +01:00
Daniele Alessandri
a894f470bd
Add an "autoload.php" utility script for autoloading in examples and tests.
2011-11-28 10:19:11 +01:00
Daniele Alessandri
b7c715a03f
Rename helper method used to fetch the key tag from a key.
...
The name "getKeyHashablePart" was too generic for this method after all.
2011-11-28 10:10:28 +01:00
Daniele Alessandri
4882e23319
Move Publish/Subscribe related classes to the Predis\PubSub namespace.
2011-11-28 10:01:21 +01:00
Daniele Alessandri
7bdc2e6195
Rename a few protected/private field names.
2011-11-25 14:17:18 +01:00
Daniele Alessandri
0fee0c6d97
Remove the underscore prefix for names of private/protected fields.
2011-11-25 14:17:11 +01:00
Daniele Alessandri
5d42b41c22
[test] Run the test suite in strict mode and use output colors.
2011-11-18 21:04:07 +01:00
Daniele Alessandri
2c1f349925
[test] Use phpunit to specify the parameters of the server used by the suite.
...
This is especially handy because users can now easily override them without
modifying the source code of the test suite and just by creating a phpunit.xml
file that is automatically picked up by phpunit over the phpunit.xml.dist file
shipped within the repository.
2011-11-18 20:54:58 +01:00
Daniele Alessandri
d784838447
[test] Sleep one second to give BGSAVE the time to complete.
2011-11-18 20:43:48 +01:00
Daniele Alessandri
654907857d
Update TODO.
2011-11-18 16:38:19 +01:00
Daniele Alessandri
5d04cf540d
New commands: INCRBYFLOAT, HINCRBYFLOAT (Redis v2.6-dev).
2011-11-18 16:10:39 +01:00
Daniele Alessandri
51b998720e
New commands: PSETEX, PEXPIRE, PEXPIREAT, PTTL (Redis v2.6-dev).
2011-11-18 15:58:36 +01:00
Daniele Alessandri
4e0709ad3d
New command: SCRIPT (Redis v2.6-dev).
...
See http://redis.io/commands/script .
2011-11-18 13:55:03 +01:00
Daniele Alessandri
f75974b5d8
New command: SLOWLOG (Redis 2.2).
...
See http://redis.io/commands/slowlog .
2011-11-18 12:42:14 +01:00
Daniele Alessandri
5680cd40b5
Support the different replies of CONFIG GET|SET|RESETSTAT.
2011-11-18 12:42:09 +01:00
Daniele Alessandri
43c9900804
Run CI only on the specified branches.
...
[ci skip]
2011-11-16 21:55:08 +01:00
Daniele Alessandri
5d5001c177
Rename markdown files using the .md extension.
2011-11-13 23:09:09 +01:00
Daniele Alessandri
3d4957b06d
Merge pull request #50 from snc/travis-ci
...
Add support for Travis CI.
2011-11-13 13:54:36 -08:00
H. Westphal
734eba3165
Added travis-ci configuration.
2011-11-13 21:17:32 +01:00
H. Westphal
22cb11d057
Fixed typo.
2011-11-13 21:03:22 +01:00
Daniele Alessandri
20f9c0c155
Update composer.json with the new directive for autoloading.
2011-11-05 14:33:16 +01:00
Daniele Alessandri
29f26b0f9b
[phpdoc] Apply a few fixes to the documentation.
2011-10-22 11:41:58 +02:00
Daniele Alessandri
2f23fb03f0
Apply minor changes to the rest of the examples.
2011-10-22 11:07:25 +02:00
Daniele Alessandri
d160cd9175
Update the server-side scripting example to use the current Redis unstable.
2011-10-22 10:55:58 +02:00
Daniele Alessandri
ce75acf81f
Merge pull request #47 from GunioRobot/clean
2011-10-21 08:04:12 -07:00
Gun.io Whitespace Robot
b9ca78ac43
Remove whitespace [Gun.io WhitespaceBot]
2011-10-21 10:50:42 -04:00
Daniele Alessandri
4e6ed3f26d
[phpdoc] Add API documentation.
...
This is a starting point to add a documentation of the whole set of APIs and
classes of Predis. The next step will be to actually improve and extend it.
2011-10-21 12:54:24 +02:00
Daniele Alessandri
1f2104ef7f
Strip the license header from files when generating the monolithic Predis file.
2011-10-18 17:35:49 +02:00
Daniele Alessandri
9608a97469
Add a license header to PHP files.
2011-10-18 16:41:46 +02:00
Daniele Alessandri
b4d5b19b30
Fix a few oversights.
2011-10-18 16:19:12 +02:00
Daniele Alessandri
20d872a306
Apply some coding style changes.
2011-10-18 15:51:55 +02:00
Daniele Alessandri
4251664095
Change the way we enable/disable the safety catch to run the test suite.
...
Now we check for the presence of the file "test/enable.tests" to enable the
test suite instead of relying on the value of a constant defined in PHP. In
this way we can prevent commiting an enabled test suite by mistake since the
above mentioned file is not tracked by Git (see .gitignore)..
2011-10-15 10:58:02 +02:00
Daniele Alessandri
b5affe739c
Promote 2.4 as the default Redis server profile.
2011-10-15 10:31:38 +02:00
Daniele Alessandri
f19c6335d1
Fix parsing of replies to INFO for Redis 2.4.
...
The new string format for INFO replies has been postponed to a future version
of Redis, so we just moved the INFO class that handles them to the development
server profile.
2011-10-15 10:21:34 +02:00
Daniele Alessandri
e070f83dc5
Test suite: move tests for case-insensitive handling of commands names.
2011-10-02 23:29:03 +02:00
Daniele Alessandri
c107d937fa
Apply minor code styling change, nothing that really matters.
2011-10-02 23:19:08 +02:00
Daniele Alessandri
68dba4cb12
Ensure that commands are registered in server profiles using lowercase aliases.
2011-10-02 23:16:04 +02:00
Daniele Alessandri
f1072f8344
Update composer.json.
2011-10-02 12:18:06 +02:00
Daniele Alessandri
5e41657363
Use the new Predis\Autoloader class for tests and examples.
2011-10-02 12:07:52 +02:00
Daniele Alessandri
04b8a8f75c
Update comment to reflect old changes.
2011-10-02 11:55:23 +02:00
Daniele Alessandri
f7d9c4bac7
Merge pull request #43 from juriansluiman/feature-uppercase
...
Now Predis follows the same standard behaviour of PHP (method names are treated
case-insensitively) when invoking methods related to Redis commands, (i.e.
$client->info() or $client->INFO() makes no difference).
2011-10-02 02:40:00 -07:00
Jurian Sluiman
49355b0881
Provide better name for test method
...
testMagicUppercase()? I don't know where I got that one from...
Just changed the method name to something more describring the
actual test.
2011-09-28 18:05:46 +02:00
Jurian Sluiman
c33d053531
Add support for mixed case commands
...
Commands in Redis are most time written in uppercase, Predis supports
only lowercase commands. This change converts all commands into lower-
case, so MiXeDcAsE and UPPERCASE commands can be created as well.
2011-09-28 17:47:56 +02:00
Jurian Sluiman
0d28395aa0
Remove additional test
...
CreateCommand and supportsCommand are the only two methods which need
to be changes, so test for only those two methods.
2011-09-28 17:34:21 +02:00
Daniele Alessandri
7ebbe25171
Merge pull request #41 from thumbtack/autoloader
...
Add an autoloader class for Predis.
2011-09-27 23:18:20 -07:00
Eric Naeseth
1296717c2d
Update README.
...
Signed-off-by: Eric Naeseth <eric@thumbtack.com >
2011-09-27 17:43:51 -07:00
Eric Naeseth
94a2ddeca9
Add an autoloader for Predis classes.
...
This makes it easier to use Predis in scripts and projects that do
not already include as PSR-0 autoloader.
Signed-off-by: Eric Naeseth <eric@thumbtack.com >
2011-09-27 17:42:06 -07:00
Jurian Sluiman
07584f859c
Add methods to test for uppercase and lowercase commands
...
At this moment predis is only capable of lowercase commands, the test
adds the requirement to provide both lowercase, uppercase (and even
mixed case) commands.
2011-09-26 20:33:45 +02:00
Daniele Alessandri
45a5dd49a7
Merge branch 'multiexec_rewrite'
2011-08-24 16:21:08 +02:00
Daniele Alessandri
bd8a44101c
Change some exception messages thrown by the transaction class.
2011-08-24 11:59:47 +02:00
Daniele Alessandri
71e7cb1399
Make some methods/fields of the transaction class protected instead of private.
2011-08-24 11:49:31 +02:00
Daniele Alessandri
f085d2f97d
Use a protected method to get all the flags of a transaction.
2011-08-24 11:46:07 +02:00
Daniele Alessandri
647cd53235
Use 'env' in the shebang instead of looking for php in /usr/bin.
2011-08-23 15:34:25 +02:00
Daniele Alessandri
8fdf935605
Make it possible to exclude certain classes when generating a single file.
...
The script that is used to create a single file out of the whole repository can
now accept a list of classes (their full FQN is needed) that must be excluded
when generating the file. The list can be passed directly in the command line
(multiple -e parameters) or in text file that contains a class name on each
line (single -E parameter).
The script does also a basic check to ensure that the user is not excluding a
class that is referenced by other subclasses.
2011-08-23 15:13:40 +02:00
Daniele Alessandri
7742fd5a22
Fix the bitmask used to check the state of subscriptions in a PubSub context.
...
The old code was not really broken, but this one is more appropriate.
2011-08-21 15:24:06 +02:00
Daniele Alessandri
7241fe6419
Make the code that process EXEC replies more easy on the eyes.
2011-08-21 15:18:39 +02:00
Daniele Alessandri
d01e738d59
Move the code that executes a transaction block to a separate method.
2011-08-21 15:15:39 +02:00
Daniele Alessandri
0bdcf299c2
Implement a few minor changes.
2011-08-21 14:58:39 +02:00
Daniele Alessandri
03d408ddad
Use a single integer to store and check the current state of a transaction.
2011-08-21 14:31:04 +02:00
Daniele Alessandri
3733e790eb
Reuse code.
2011-08-21 11:55:08 +02:00
Daniele Alessandri
a9e34cabb1
Add a composer.json for Composer.
...
Composer is a package manager for PHP currently under development. You can find
details about Composer at the following URL http://github.com/composer/composer
2011-08-21 10:12:54 +02:00
Daniele Alessandri
b30f495345
Change how the hash of a node is retrieved in the hashring-based distributor.
...
Now classes that extend Predis\Distribution\HashRing can override how the hash
of a node is retrieved in order to implement different kind of distribution
strategies while reusing the base algorithm.
2011-08-20 18:07:42 +02:00
Daniele Alessandri
c6fa5232bc
Unset multiple fields with just one unset().
2011-08-20 18:00:58 +02:00
Daniele Alessandri
2b62b75557
Jot down planned improvements for the single-file builder script.
2011-08-20 16:36:11 +02:00
Daniele Alessandri
6151d6d53e
Improve actual "namespace" and "use" directives detection (fix ISSUE #35 ).
2011-08-20 16:30:33 +02:00
Daniele Alessandri
db51f6e0d0
Remove spurious carriage returns and trailing spaces.
2011-08-20 16:27:59 +02:00
Daniele Alessandri
62744fbb02
Merge branch 'webdis_connection'
2011-06-29 12:05:24 +02:00
Daniele Alessandri
05b111d6d2
Update comment.
2011-06-29 12:05:00 +02:00
Daniele Alessandri
fc51f23ca7
Return cURL errors on HTTP response codes >= 400.
...
By default the cURL extension does not trigger any error when fetching a
response with an HTTP code >= 400. Changing this behaviour is also useful to
intercept the 403 error generated when executing Redis commands disallowed
on Webdis by using ACLs.
2011-06-08 23:07:23 +02:00
Daniele Alessandri
b85bc00880
Add support for the 'connection_timeout' parameter with WebdisConnection.
2011-06-08 22:40:35 +02:00
Daniele Alessandri
86256f2819
Minor reorganization, nothing worth mentioning.
2011-06-08 21:56:11 +02:00
Daniele Alessandri
bc040fae6f
Change handling of unsupported methods in Predis\Network\WebdisConnection.
2011-06-08 21:53:54 +02:00
Daniele Alessandri
e7d2717ee1
Switch from pecl_http to the cURL extension to make requests against Webdis.
...
The cURL extension is easily found already packaged for various Linux
distributions, it provides everything needed and it seems to have a lower
overhead compared to pecl_http.
2011-06-08 21:43:23 +02:00
Daniele Alessandri
0de4af07dd
Fix wrong serialization for commands that do not have arguments.
2011-06-06 12:49:38 +02:00
Daniele Alessandri
ff7812282e
Slightly change how HTTP options are initialized and handled.
2011-06-06 12:18:37 +02:00
Daniele Alessandri
e5a85dfce8
Add support for HTTP basic access authentication.
...
With Webdis it is possible to define some access control rules to allow or
disallow certain commands and one of the possible configurations is based on
plain old HTTP authentication.
2011-06-05 22:24:03 +02:00
Daniele Alessandri
4b3ba03a3e
Disallow certain commands that are disabled or do not make sense with Webdis.
2011-06-05 21:43:55 +02:00
Daniele Alessandri
776501b31a
Use a faster approach to serialize the POST data for HTTP requests to Webdis.
2011-06-05 21:01:15 +02:00
Daniele Alessandri
2c8d256bdc
Reimport Predis\Network\WebdisConnection with updates.
...
I could have rebased the previous branch with master, but since it was only a
single file and its history was basically meaningless I preferred to start
from scratch.
2011-06-05 18:46:16 +02:00
Daniele Alessandri
0195a7488a
Fix a bug in Predis\Network\StreamConnection::writeBytes().
...
When PHP's fwrite() ends up writing only a part of $buffer over the network,
this method attempts to automatically write the rest of $buffer. Due to this
bug, the data being already sent to the server was not discarded from $buffer.
Usually fwrite() writes the whole $buffer in one go, but anyway this bug would
not have passed unnoticed since it results in malformed requests and Redis
would have surely returned a -ERR reply.
2011-06-05 17:05:04 +02:00
Daniele Alessandri
a8e063e855
Minor updates to README.
2011-06-05 10:19:02 +02:00
Daniele Alessandri
2cdcd297f0
Rename Predis\Client::pubSubContext() to Predis\Client::pubSub().
2011-06-04 18:47:59 +02:00
Daniele Alessandri
65c0336d2f
Use the shared initializer to initialize Pub/Sub and accept callbacks.
...
When a callback is specified, the client does not return a new instance
of Predis\PubSubContext but it invokes that callback on each message
received. The context can be aborted simply by returning FALSE from the
callback.
2011-06-04 18:41:38 +02:00
Daniele Alessandri
8c207f71bd
Removing leftovers.
2011-06-04 17:12:24 +02:00
Daniele Alessandri
42f4663050
Move Predis\ConnectionException to Predis\Network\ConnectionException.
2011-06-04 16:00:35 +02:00
Daniele Alessandri
3801928e0d
Move Predis\ProtocolException to Predis\Protocol\ProtocolException.
2011-06-04 15:53:31 +02:00
Daniele Alessandri
d59556cae1
Rename the Predis\Protocols namespace to Predis\Protocol.
2011-06-04 15:45:01 +02:00
Daniele Alessandri
667ce97213
Remove a useless return statement.
2011-06-04 15:27:36 +02:00
Daniele Alessandri
101fffbabe
Do not check for the existence of a UNIX domain socket file in userland.
...
Now Predis throws an instance of Predis\ConnectionException when trying to
connect to an instance of Redis on a non-existent UNIX domain socket file.
2011-06-04 15:19:06 +02:00
Daniele Alessandri
b35dcd515b
Change the code layout of private/protected fields.
2011-06-02 23:49:46 +02:00
Daniele Alessandri
df0943120e
Add a fire-and-forget executor for pipelines.
2011-06-02 23:44:49 +02:00
Daniele Alessandri
b72b12c5cd
Fix wrong exception being thrown on invalid instance types passed to 'executor'.
2011-06-02 23:41:12 +02:00
Daniele Alessandri
3f2814c254
Change the code layout of private/protected fields.
2011-06-02 18:53:53 +02:00
Daniele Alessandri
1bd4a25e36
Remove code comments in the exception classes. Descriptions will be added again later with proper documentation.
2011-06-02 18:43:52 +02:00
Daniele Alessandri
24aaa2ac23
Nothing relevant, just reorganizing some private members.
2011-06-02 17:52:22 +02:00
Daniele Alessandri
ba4ebb3799
Make the specialized pipeline and transaction initializer methods of Predis\Client protected.
2011-06-02 17:37:33 +02:00
Daniele Alessandri
087b8b0b2b
Pass a transaction instance as the first argument of Predis\Transaction\AbortedMultiExecException.
2011-06-02 17:34:06 +02:00
Daniele Alessandri
b3910466c9
Clean up a bit the private transaction initializer method of Predis\Client.
2011-06-02 17:25:04 +02:00
Daniele Alessandri
6ad73c782a
Move classes related to MULTI/EXEC abstraction to the Predis\Transaction namespace.
2011-06-02 17:20:18 +02:00
Daniele Alessandri
fee3866f54
Make it possible to pipeline instances of Predis\Command\ICommand directly.
2011-06-02 16:53:16 +02:00
Daniele Alessandri
dfad0d3d24
Rename private variables.
2011-06-02 16:44:52 +02:00
Daniele Alessandri
1ba1408d39
Move the handling of pipeline options inside the pipeline class.
2011-06-02 16:41:17 +02:00
Daniele Alessandri
e048ac2d51
Move the PipelineContext class in the Predis\Pipeline namespace.
2011-06-02 16:03:33 +02:00
Daniele Alessandri
fb3088b4d3
Redis 2.4 has now its server profile (but it's not the default one yet). The development profile is now Redis 2.6.
2011-05-31 22:01:15 +02:00
Daniele Alessandri
962037321a
Make ZADD and ZREM variadic commands for Redis 2.4.
2011-05-31 21:28:37 +02:00
Daniele Alessandri
42521f2558
Do not use new classes for variadic RPUSH, LPUSH, SADD, SREM and HDEL in the 2.4 profile.
2011-05-31 21:26:04 +02:00
Daniele Alessandri
2012963ed0
Add the Predis\IReplyObject interface (used to mark returned objects that must skip reply parsing).
2011-05-21 11:04:15 +02:00
Daniele Alessandri
deeb58644a
Fix missing change that should have been part of commit cc2349c.
2011-05-21 10:50:42 +02:00
Daniele Alessandri
9f05f50899
Why not using markdown when the FAQ is actually a markdown file?
2011-05-19 12:46:55 +02:00
Daniele Alessandri
fd97cd1bad
Update the FAQ with details on the missing support for transparent (de)serialization of values.
2011-05-19 12:44:47 +02:00
Daniele Alessandri
cc2349c785
Change how error messages for server-side errors are handled.
2011-05-14 10:34:22 +02:00
Daniele Alessandri
8efe76ad60
Make Predis\Commands\ServerEvalSHA inherited from Predis\Commands\ServerEval.
2011-05-13 21:36:25 +02:00
Daniele Alessandri
2010774b68
New command: EVALSHA (Redis v2.4-dev).
2011-05-13 21:23:02 +02:00
Daniele Alessandri
909b06e805
Add support for transparent key prefixing to EVAL and the Predis\Commands\ScriptedCommand class.
2011-05-13 20:22:06 +02:00
Daniele Alessandri
13ac03e134
Merge branch 'redis_scripting'
2011-05-13 20:06:34 +02:00
Daniele Alessandri
092b822033
Add an example for server-side scripting with Lua using Predis abstractions.
2011-05-13 20:06:06 +02:00
Daniele Alessandri
0e0cd865e7
Change the default value for the number of arguments used to populate KEYS.
2011-05-13 19:55:24 +02:00
Daniele Alessandri
228a2ceb2e
Update TODO.
2011-05-13 12:58:42 +02:00
Daniele Alessandri
b688beaff7
Update FAQ for performance numbers.
2011-05-13 12:58:16 +02:00
Daniele Alessandri
51e0d61833
Update README.
2011-05-13 08:54:28 +02:00
Daniele Alessandri
6e6a28a9f0
Reduce method calls by one when creating a new connection in Predis\Client.
2011-05-07 11:33:33 +02:00
Daniele Alessandri
486225111d
Allow developers to define connections with Predis\ConnectionFactory using callable objects.
2011-05-07 10:54:22 +02:00
Daniele Alessandri
cd8b3535ef
Simplify Predis\ConnectionFactory.
2011-05-07 10:49:32 +02:00
Daniele Alessandri
984fd06c77
Fix check for unsupported parameters in Predis\Network\PhpiredisConnection.
2011-05-07 09:29:50 +02:00
Daniele Alessandri
b087b9814d
Remove a useless method from the cluster option class.
2011-05-06 16:32:39 +02:00
Daniele Alessandri
4d1dcdb280
Change type check order for client options.
2011-05-06 15:39:22 +02:00
Daniele Alessandri
893618c985
Initialize client options in a lazy way.
2011-05-06 15:20:40 +02:00
Daniele Alessandri
0255261cd5
Whoops, forgot to add Predis\Options\ClientCluster to the repository.
2011-05-05 18:43:08 +02:00
Daniele Alessandri
5f0799ab65
Predis\Commands\Command::filterArguments() is protected.
2011-05-05 17:30:05 +02:00
Daniele Alessandri
e97e13bde5
Add the 'prefix' client option. The client will automatically prepend the specified prefix string to each key.
2011-05-05 17:16:14 +02:00
Daniele Alessandri
46db0409a1
Merge branch 'command_processor'
2011-05-05 16:31:55 +02:00
Daniele Alessandri
cb363b52f6
Update examples.
2011-05-05 16:24:46 +02:00
Daniele Alessandri
724543a4e6
Rename Predis\Network\ConnectionCluster to Predis\Network\PredisCluster.
2011-05-05 15:55:24 +02:00
Daniele Alessandri
150795f999
Remove the key_distribution option and allow user-defined callbacks to initialize a cluster connection.
2011-05-05 15:06:00 +02:00
Daniele Alessandri
9b4a915a52
Dynamically check for the presence of the WITHSCORE modifier with the ZRANGE family of commands.
2011-05-04 22:44:37 +02:00
Daniele Alessandri
b47a3f9ab8
Implement Predis\Commands\Command::setRawArguments().
2011-05-04 18:52:26 +02:00
Daniele Alessandri
5a80876c64
Handle key prefixing in a more consistent way, and make it a first-class citizen in Predis.
2011-05-04 18:06:40 +02:00
Daniele Alessandri
b5ebf48318
Make command processors accept only instances of Predis\Commands\ICommand.
2011-05-04 13:06:57 +02:00
Daniele Alessandri
09b5d7ac61
Change Predis\Commands\Preprocessors to Predis\Command\Processors.
2011-05-04 11:23:31 +02:00
Daniele Alessandri
812d37b2d4
Fix typo.
2011-05-04 00:13:53 +02:00
Daniele Alessandri
859ee35c68
Expose two methods to retrieve the standard prefixing strategies used for commands accepting single or multiple keys.
2011-05-03 21:59:43 +02:00
Daniele Alessandri
ca22208ce8
Define a default value for the number of values used to populate KEYS.
2011-05-03 18:00:30 +02:00
Daniele Alessandri
a386263d84
Add an helper method to get the actual keys from the whole argument list.
2011-05-03 17:37:39 +02:00
Daniele Alessandri
2bdfed5071
Add an abstraction for a virtual command that leverages Redis scripting with the new EVAL command.
2011-05-03 15:14:51 +02:00
Daniele Alessandri
bd027341be
New command: EVAL (Redis v2.4-dev).
2011-05-03 15:07:56 +02:00
Daniele Alessandri
4fc87fa161
Update README.
2011-05-03 14:31:35 +02:00
Daniele Alessandri
be1f0914b1
Update README's markdown code to show nice colors on GitHub.
2011-04-26 08:26:22 +02:00
Daniele Alessandri
804a5d95fb
Merged pull request #28 from udat/110425-fixes.
...
A few fixes
2011-04-25 15:02:28 -07:00
Artur Kotyrba
650d6a07e0
Fixed method and class name
2011-04-25 23:39:05 +02:00
Artur Kotyrba
d4694da487
Added missing use statements
2011-04-25 23:37:00 +02:00
Artur Kotyrba
7e4b367a1d
Removed unused argument for constructor of SafeExecutor and SafeClusterExecutor
2011-04-25 23:36:30 +02:00
Daniele Alessandri
19b703588b
Add an example for Predis\DispatcherLoop.
2011-04-25 14:39:29 +02:00
Daniele Alessandri
b5a1ba9795
Minor code and formatting changes for the example files.
2011-04-25 14:22:34 +02:00
Daniele Alessandri
21372bef6d
Add an example for Predis\MonitorContext.
2011-04-25 14:17:24 +02:00
Daniele Alessandri
e507198cc3
Do not populate the 'arguments' property if commands received with MONITOR do not carry an argument list.
2011-04-25 14:16:12 +02:00
Daniele Alessandri
88a9f509b4
Fix database handling in Predis\MonitorContext.
2011-04-25 14:14:01 +02:00
Daniele Alessandri
b2575bd667
Reorganize some Redis commands classes.
2011-04-25 12:39:21 +02:00
Daniele Alessandri
86edc50ac4
Rename Predis\ConnectionParameters::setByUser().
2011-04-25 09:49:38 +02:00
Daniele Alessandri
dac0104267
Move the reducer function in Predis\Commands\Command::__toString() to a protected method.
2011-04-25 09:48:39 +02:00
Daniele Alessandri
f7a3388865
Adjust formatting of Predis\Profiles\ServerVersionNext.
2011-04-25 09:42:07 +02:00
Daniele Alessandri
7b4da3cd78
Use variadic SUBSCRIBE in the PubSub example.
2011-04-24 14:11:34 +02:00
Daniele Alessandri
6dd3565c67
Reuse code.
2011-04-24 14:10:53 +02:00
Daniele Alessandri
3ca4645231
Implement Predis\DispatcherLoop on top of Predis\PubSubContext.
2011-04-24 13:57:19 +02:00
Daniele Alessandri
c07c610a0d
Implement Predis\MonitorContext as an abstraction for the MONITOR command.
2011-04-24 13:16:16 +02:00
Daniele Alessandri
880d2d24b9
Add the ability to get a connection out of a cluster using a key.
2011-04-24 11:13:33 +02:00
Daniele Alessandri
4ef8948b5e
Move the key-tag extractor method to Predis\Helpers.
2011-04-24 11:04:17 +02:00
Daniele Alessandri
b396eb3c48
Remove code from the test for SLAVEOF.
2011-04-24 10:03:23 +02:00
Daniele Alessandri
b4a90df812
Reuse code.
2011-04-24 09:59:01 +02:00
Daniele Alessandri
dd3faa3d53
New command: CLIENT (Redis v2.4-dev).
2011-04-24 09:32:47 +02:00
Daniele Alessandri
819f3ca6ed
Implement variadic SREM in the development profile (Redis v2.4).
2011-04-24 09:06:23 +02:00
Daniele Alessandri
8787930977
Implement variadic HDEL in the development profile (Redis v2.4).
2011-04-19 20:49:30 +02:00
Daniele Alessandri
a8705b9535
Implement variadic SADD in the development profile (Redis v2.4).
2011-04-19 20:42:50 +02:00
Daniele Alessandri
66f6610c72
Implement variadic RPUSH and LPUSH in the development profile (Redis v2.4).
2011-04-19 20:35:48 +02:00
Daniele Alessandri
9bc50e321e
The stable version of Redis will be 2.4.
2011-04-19 20:04:37 +02:00
Daniele Alessandri
4af1b7744c
Implement an option to specify which cluster class to use.
2011-04-12 15:42:37 +02:00
Daniele Alessandri
cbc7929f6e
Move the logic of the connection factory option to a dedicated class.
2011-04-12 14:45:28 +02:00
Daniele Alessandri
1a175da7ca
Predis\ConnectionParameters::__isset() should check if a parameters has been set and its value is not null.
2011-04-12 13:01:22 +02:00
Daniele Alessandri
f6eab6ec3a
Just a minor code styling change.
2011-04-11 23:43:49 +02:00
Daniele Alessandri
07d9717f8a
Fix wrong import with the 'use' directive.
2011-04-11 23:23:55 +02:00
Daniele Alessandri
3f3c235363
Make Predis\Distribution\IDistributionStrategy extend the new Predis\Distribution\INodeKeyGenerator interface.
2011-04-11 23:20:10 +02:00
Daniele Alessandri
a348e32144
Improve Predis\Client::getConnection() internals.
2011-04-11 18:53:02 +02:00
Daniele Alessandri
55899e7741
Check for null client options in the filter method.
2011-04-11 18:21:05 +02:00
Daniele Alessandri
d1157a506d
Remove useless code.
2011-04-11 18:21:01 +02:00
Daniele Alessandri
bea8a3239d
Remove default null value from Predis\Client::initializeConnection().
2011-04-11 17:01:26 +02:00
Daniele Alessandri
839ce08487
Mostly aesthetic changes for Predis\PubSubContext.
2011-04-11 16:19:22 +02:00
Daniele Alessandri
944a478272
Remove Predis\Commands\Command::setArguments().
2011-04-09 09:35:28 +02:00
Daniele Alessandri
83bab78bd1
Rename the newConnection() method to create() in Predis\ConnectionFactory.
2011-04-08 16:55:08 +02:00
Daniele Alessandri
b22cb6f76d
Rename Predis\IConnectionSchemes to Predis\IConnectionFactory.
2011-04-08 16:40:25 +02:00
Daniele Alessandri
5527fc34e7
Split the FAQ file.
2011-04-08 15:23:23 +02:00
Daniele Alessandri
7979d9ab64
Update TODO.
2011-04-08 11:23:02 +02:00
Daniele Alessandri
0396320951
Merge branch 'command_preprocessors'
2011-04-08 11:22:24 +02:00
Daniele Alessandri
20ce6e523a
Add an example to show how to leverage key prefixes.
2011-04-08 11:16:06 +02:00
Daniele Alessandri
44d4c77918
Merge branch 'protocols'
2011-04-07 10:34:46 +02:00
Daniele Alessandri
65fc4f7d55
Rename to Predis\Protocols\IComposableProtocolProcessor.
2011-04-07 10:34:30 +02:00
Daniele Alessandri
6e2bba3ddb
Move the definition of the OBJECT commad to the server profile for Redis 2.2.
2011-04-06 18:51:52 +02:00
Daniele Alessandri
2a47dc8275
Update TODO.
2011-04-06 18:32:52 +02:00
Daniele Alessandri
9340b3ddce
Partially rewrite the shared abstraction initializer method of Predis\Client.
2011-04-06 18:31:53 +02:00
Daniele Alessandri
db95350c37
Reorganize the Predis\Protocols namespace.
2011-04-06 17:52:39 +02:00
Daniele Alessandri
80f1cedf79
Add the OBJECT command to the dev server profile.
2011-04-06 12:49:54 +02:00
Daniele Alessandri
33f6419700
Invoke preprocessors after checking if a command is defined by the current profile.
2011-04-05 21:38:49 +02:00
Daniele Alessandri
771a0ee179
Pass method names to preprocessors by value.
2011-04-05 21:34:05 +02:00
Daniele Alessandri
1d9b53d443
Rename class to Predis\Commands\Preprocessors\KeyPrefixPreprocessor.
2011-04-05 20:46:40 +02:00
Daniele Alessandri
86df741937
Rename Predis\Utils to Predis\Helpers.
2011-04-05 16:37:36 +02:00
Daniele Alessandri
4ea8489110
Differentiate communication exceptions between connection and protocol exceptions.
2011-04-05 15:59:21 +02:00
Daniele Alessandri
ae96b0f39f
Actually implement preprocessor removal from a preprocessor chain.
2011-04-05 13:07:11 +02:00
Daniele Alessandri
1ee7926673
Check values passed to PreprocessorChain::offsetSet().
2011-04-05 12:37:11 +02:00
Daniele Alessandri
b5d748156e
Implement a class to chain multiple command preprocessors.
2011-04-05 12:31:00 +02:00
Daniele Alessandri
5e05febf33
Implement a namespacing preprocessor to prefix Redis keys transparently.
2011-04-05 11:57:37 +02:00
Daniele Alessandri
07b4238ce7
Add an abstraction to optionally preprocess command arguments.
2011-04-05 11:56:36 +02:00
Daniele Alessandri
c0d9b53ff7
Fix mistakes in the FAQ.
2011-04-04 17:17:33 +02:00
Daniele Alessandri
9954bd5a12
Share more code between connection classes.
2011-04-04 17:17:14 +02:00
Daniele Alessandri
4b25c41f78
Update FAQ.
2011-04-04 15:57:37 +02:00
Daniele Alessandri
ac471eeff3
Rename and simplify Predis\Profiles\ServerProfile::registerProfile().
2011-04-04 15:31:01 +02:00
Daniele Alessandri
da2cd3ee7e
Simplify Predis\Profiles\ServerProfile::defineCommand().
2011-04-04 15:03:14 +02:00
Daniele Alessandri
bfa9cc7469
Fix FAQ (3300 is actually 3200, just a typo).
2011-04-04 12:17:20 +02:00
Daniele Alessandri
87a1f43487
More updates for the performance numbers in the FAQ.
2011-04-04 12:14:19 +02:00
Daniele Alessandri
556f7b0ec2
Update the average numbers reported in the FAQ after the recent optimizations.
2011-04-04 12:05:35 +02:00
Daniele Alessandri
7146a32f6d
Fix the phpiredis-based connection class.
2011-04-04 11:57:47 +02:00
Daniele Alessandri
595692d50f
Minor fixes and adjustments to pipeline executors.
2011-04-04 11:42:52 +02:00
Daniele Alessandri
c2a61a3113
Rename Predis\CommandPipeline to Predis\PipelineContext.
2011-04-04 11:31:26 +02:00
Daniele Alessandri
27d56a7ac9
Methods for defining commands at runtime should not be enforced in the Predis\Profiles\IServerProfile interface.
2011-04-04 11:23:38 +02:00
Daniele Alessandri
4c84eb181b
Minor changes for Predis\Network\StreamConnection.
2011-04-04 11:20:12 +02:00
Daniele Alessandri
503cc86f7d
Move method to the base Predis\Network\ConnectionBase class.
2011-04-04 10:37:53 +02:00
Daniele Alessandri
8300b1d63c
Fix parameter validation and use a slightly optimized approach.
2011-04-03 13:42:42 +02:00
Daniele Alessandri
62b4e52eef
Update TODO.
2011-04-03 12:20:01 +02:00
Daniele Alessandri
8a2f53059a
Make Predis\ConnectionParameters::__construct() faster.
2011-04-03 11:36:28 +02:00
Daniele Alessandri
c2097b4242
Add .gitignore file.
2011-04-03 11:10:12 +02:00
Daniele Alessandri
6f51521f81
Rename test file.
2011-04-03 10:55:27 +02:00
Daniele Alessandri
609db5159e
Remove Predis\ComposableConnectionParameters (superseeded by Predis\ConnectionParameters).
2011-04-03 10:47:37 +02:00
Daniele Alessandri
5ab210fd9d
Allow users to undefine a default parameter.
2011-04-03 10:45:47 +02:00
Daniele Alessandri
6fe57bae3f
Implement support for using Predis\Options\IOption with Predis\ConnectionParameters.
2011-04-03 10:38:02 +02:00
Daniele Alessandri
9c0012837a
Return the path of the file as the identifier for connections based on UNIX domain sockets.
2011-04-03 10:12:28 +02:00
Daniele Alessandri
741495037e
Make Predis\ConnectionParameters extensible.
2011-04-03 09:59:54 +02:00
Daniele Alessandri
9d5dc120dc
Implement serialization/deserialization for Predis\ConnectionParameters.
2011-04-03 09:32:07 +02:00
Daniele Alessandri
74f6f9ab85
Small refactoring of the internals of Predis\ConnectionParameters.
2011-04-03 09:26:53 +02:00
Daniele Alessandri
0d6ffaf0f0
Minor fixes to the connection parameters classes.
2011-04-01 00:35:02 +02:00
Daniele Alessandri
9389f217c8
Reimplement Predis\ConnectionParameters and move the old implementation to Predis\ComposableConnectionParameters.
2011-03-31 19:13:27 +02:00
Daniele Alessandri
3f720ad867
Add the new Predis\IConnectionParameters interface.
2011-03-31 15:12:52 +02:00
Daniele Alessandri
17f51420ce
Improve speed for options validation.
2011-03-31 14:29:06 +02:00
Daniele Alessandri
3d9ddeef98
Opt for a smaller and slightly more efficient solution.
2011-03-31 00:17:11 +02:00
Daniele Alessandri
85c1a7a852
Fix ISSUE #27 .
2011-03-30 23:24:45 +02:00
Daniele Alessandri
094a5bcc90
Fix wrong command class for KEYS in the v2.2 server profile.
2011-03-29 00:14:54 +02:00
Daniele Alessandri
f637872421
Keeping the server profiles classes independent leads to faster initialization times.
2011-03-28 23:56:31 +02:00
Daniele Alessandri
de1a183315
Do some micro-optimizations to reduce the overhead of creating client instances.
2011-03-28 23:25:37 +02:00
Daniele Alessandri
ab45b7a461
Fix wrong value :-)
2011-03-28 18:22:54 +02:00
Daniele Alessandri
2ed31eeb16
Update the average performance reported in the FAQ after some internal improvements.
2011-03-28 12:47:46 +02:00
Daniele Alessandri
3b70d1e020
Change code formatting for the classes in the Predis\Commands namespace.
2011-03-27 19:46:02 +02:00
Daniele Alessandri
2201dd1df2
Merge branch 'command_hashing'
2011-03-27 18:50:55 +02:00
Daniele Alessandri
658782f531
Add a script to generate a Phar archive of Predis from the repository.
2011-03-27 15:01:51 +02:00
Daniele Alessandri
c4064e5801
Some commands accepting multiple keys can be hashed if all the keys return the same hash (key tags).
...
List of the commands affected by this change (based on Redis 2.2):
MSET, MGET, DEL, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, SINTER, SINTERSTORE,
SUNION, SUNIONSTORE, SDIFF, SDIFFSTORE, ZINTERSTORE, ZUNIONSTORE.
2011-03-27 12:12:51 +02:00
Daniele Alessandri
d6a445f1ec
Fix SINTERSTORE and SUNIONSTORE to accept an array for the list of source keys.
2011-03-27 09:38:30 +02:00
Daniele Alessandri
0f751cabcb
Upgrade to PHPUnit 3.5.
2011-03-27 09:15:38 +02:00
Daniele Alessandri
b007b753f5
Fix SUBSCRIBE and PSUBSCRIBE so that they can accept a list of channels for subscription.
2011-03-26 22:45:52 +01:00
Daniele Alessandri
b84c84007f
Remove Predis\ICommand::canBeHashed() as a public method required for command classes and reuse it internally to Predis\Command.
2011-03-24 00:43:02 +01:00
Daniele Alessandri
4e0e1908cd
Minor speed optimizations.
2011-03-23 23:27:05 +01:00
Daniele Alessandri
930a1096e1
Refactor the key hashing logic for Redis commands.
2011-03-23 22:58:49 +01:00
Daniele Alessandri
cdfd0b9f5c
Fix more problems of Predis\MultiExecContext on certain cases.
2011-03-20 15:27:59 +01:00
Daniele Alessandri
cb1f27a403
Update TODO.
2011-03-20 12:08:34 +01:00
Daniele Alessandri
e4c45455fe
Fix a couple of corner cases for Predis\MultiExecContext.
2011-03-20 10:47:57 +01:00
Daniele Alessandri
ceca866158
Remove Predis\Network\IConnectionSingle::setProtocolOption() for now.
2011-03-20 10:47:30 +01:00
Daniele Alessandri
665e428366
Give up on some core reusing practices in favor of execution speed and memory usage.
2011-03-20 10:07:40 +01:00
Daniele Alessandri
31e068796f
Update FAQ.
2011-03-18 23:19:25 +01:00
Daniele Alessandri
e84844e33c
Reimplement Predis\Options\CustomOption to implement directly the Predis\Options\IOption interface.
2011-03-18 22:25:45 +01:00
Daniele Alessandri
21ac9b06f5
Do not validate default option values, assume that default values are correct.
2011-03-18 22:01:50 +01:00
Daniele Alessandri
e5ff0ab992
Remove the 'on_connection_initialized' client option (useless in the vast majority of cases).
2011-03-18 21:47:52 +01:00
Daniele Alessandri
743feb0634
Optimize Predis\ClientOptions.
2011-03-18 21:38:37 +01:00
Daniele Alessandri
afd78b49a6
Update README and samples.
2011-03-18 15:45:27 +01:00
Daniele Alessandri
94d0805cf6
Apply minor change.
2011-03-18 15:13:52 +01:00
Daniele Alessandri
15af329aa3
Add a new option to specify different connection schemes handlers on a client-instance level.
2011-03-18 15:04:06 +01:00
Daniele Alessandri
a10a8e3c9b
Clean up code before fast-forwarding the master branch.
2011-03-12 15:56:22 +01:00
Daniele Alessandri
3181f6c592
Remove useless code.
2011-03-12 15:26:39 +01:00
Daniele Alessandri
b11ab53bb1
Implement new various changes.
2011-03-11 19:07:46 +01:00
Daniele Alessandri
82759cd6ec
Change how parameters are handled internally.
2011-03-10 16:30:00 +01:00
Daniele Alessandri
b5a89a0f50
Add a VERSION constant to Predis\Client.
2011-03-08 11:03:32 +01:00
Daniele Alessandri
2853214ddc
Update FAQ.
2011-03-08 10:57:06 +01:00
Daniele Alessandri
e5e7933aef
Add missing file extension.
2011-03-07 19:01:39 +01:00
Daniele Alessandri
a81f76d376
Add a FAQ file (it will also be used in the wiki).
2011-03-07 18:59:54 +01:00
Daniele Alessandri
9b17352d9c
Transit from UNSTABLE to BETA.
2011-03-07 11:23:26 +01:00
Daniele Alessandri
14d4492ad6
Slight change, nothing serious here.
2011-03-07 11:12:20 +01:00
Daniele Alessandri
995de40734
Fix Predis\Network\PhpiredisConnection.
2011-03-06 16:20:37 +01:00
Daniele Alessandri
190b687789
Change how network resources are handled internally and also exposed to subclasses.
2011-03-06 14:45:59 +01:00
Daniele Alessandri
e94fbc3287
Adjust the tests for SUBSTR/GETRANGE since the return value for empty string slices has been fixed in Redis 2.2.2.
2011-03-06 12:45:23 +01:00
Daniele Alessandri
826db07900
Force the test suite to use the 2.2 server profile for now.
2011-03-06 12:39:18 +01:00
Daniele Alessandri
be4d01c071
Remove a useless method declaration.
2011-03-06 12:32:43 +01:00
Daniele Alessandri
74b6d05b48
Move the database info parsing bits for the reply to INFO in a separate function.
2011-03-06 12:24:51 +01:00
Daniele Alessandri
58eb4e2477
Make the reply parser for INFO < 2.4 somewhat backwards compatible when used against Redis >= 2.4.
2011-03-06 12:22:22 +01:00
Daniele Alessandri
3186da49b4
Parse allocation_stats if present in the INFO reply.
2011-03-06 12:14:19 +01:00
Daniele Alessandri
3f8b639e2b
Change StreamConnection in order to disable read/write timeouts when the value of 'read_write_timeout' is also equal to 0.
2011-03-06 11:03:53 +01:00
Daniele Alessandri
6ce35c97e9
Update README.
2011-03-06 10:08:35 +01:00
Daniele Alessandri
b03e6c4f02
Make CommandPipeline::recordCommand() overridable by subclasses.
2011-03-06 10:05:46 +01:00
Daniele Alessandri
7bef3abf91
Change the code for the initialization of the phpiredis reader resource.
2011-03-06 09:55:22 +01:00
Daniele Alessandri
3b4ef4f33e
Update README.
2011-03-05 18:42:52 +01:00
Daniele Alessandri
f668560a5a
Implement ConnectionParameters::__toString().
2011-03-05 16:36:34 +01:00
Daniele Alessandri
6c9b246b2b
Implement a new command class for INFO to parse the new reply format for this command in Redis > 2.2.
2011-03-05 15:47:54 +01:00
Daniele Alessandri
878b338e87
Fix comment.
2011-03-05 12:27:02 +01:00
Daniele Alessandri
38e76cbbc8
Allow passing an array for the list of source keys to be used in ZUNIONSTORE/ZINTERSTORE.
2011-03-05 11:56:10 +01:00
Daniele Alessandri
f8844ef8b8
Rename IServerProfile::registerCommand() to IServerProfile::defineCommand().
2011-03-05 10:52:38 +01:00
Daniele Alessandri
3681c1e622
Clustered connections should use IConnectionSingle::executeCommand() to execute commands internally.
2011-03-05 10:52:31 +01:00
Daniele Alessandri
99c8acfc8c
Clean up leftovers.
2011-03-04 19:38:47 +01:00
Daniele Alessandri
30bc53ee75
Rename method ICommand::getCommandId() to ICommand::getId().
2011-03-04 19:37:10 +01:00
Daniele Alessandri
0d5fb3319d
Move Predis\Command and Predis\ICommand to the Predis\Commands namespace.
2011-03-04 19:21:41 +01:00
Daniele Alessandri
c3ce210150
Remove a useless 'use' directive.
2011-03-04 18:56:20 +01:00
Daniele Alessandri
8b749386df
Implement Predis\Command::__toString().
2011-03-04 17:17:49 +01:00
Daniele Alessandri
6abac4590d
Rename protocol interfaces.
2011-03-04 17:00:23 +01:00
Daniele Alessandri
a627b91be1
Fix some more namespacing issues.
2011-03-04 16:18:27 +01:00
Daniele Alessandri
5077996940
Add the ability to create new connections using uri strings, array of parameters or instances of Predis\ConnectionParameters.
2011-03-04 16:06:38 +01:00
Daniele Alessandri
db807e7a91
Do not fail on undefined client options properties.
2011-03-04 15:42:45 +01:00
Daniele Alessandri
3021cbd76b
Fix wrong name for private field.
2011-03-04 15:12:02 +01:00
Daniele Alessandri
2c4a9e92a6
Add the ability to define custom handlers for client options and connection parameters.
2011-03-04 15:10:43 +01:00
Daniele Alessandri
d077aa67db
Remove since it generates overhead for nothing really useful.
2011-03-04 13:05:28 +01:00
Daniele Alessandri
0af002b3b9
Update README.
2011-03-04 12:50:12 +01:00
Daniele Alessandri
a3218721c1
Merge branch 'phpiredis_new_api'
2011-03-04 12:04:51 +01:00
Daniele Alessandri
21c959a451
Fix namespacing issues with Predis\ClientException.
2011-03-04 11:58:07 +01:00
Daniele Alessandri
ba9c3ed3db
Fix README.
2011-03-02 17:58:06 +01:00
Daniele Alessandri
eba7f84335
Fix the validation of default values for Predis\Options\Option class.
2011-03-02 17:44:10 +01:00
Daniele Alessandri
1e1a904d1a
Update the client features test suite (still needs more test coverage of the whole API).
2011-03-02 17:40:27 +01:00
Daniele Alessandri
33ffca23a0
Check if the socket extension is loaded.
2011-03-02 15:16:49 +01:00
Daniele Alessandri
6fada0c35c
Add some notes.
2011-03-02 15:00:52 +01:00
Daniele Alessandri
99129fbf91
Implement a new Predis\Network\PhpiredisConnection class that internally uses phpiredis.
2011-03-02 12:28:42 +01:00
Daniele Alessandri
5431af0c4b
Update examples to the new connection API design.
2011-03-02 10:11:58 +01:00
Daniele Alessandri
89c311d0de
Complete redesign of the network connection API, it should make much more sense now.
2011-03-02 10:02:29 +01:00
Daniele Alessandri
fda4f32f06
Rename server profile classes to comply with how underscores are interpreted in the PSR-0 standard.
2011-02-27 13:37:03 +01:00
Daniele Alessandri
9fcdc73499
Fix a couple of namespacing issues with client exceptions in connection classes (ISSUE #24 ).
2011-02-26 23:19:13 +01:00
Daniele Alessandri
ba4dc10936
Update README.
2011-02-26 23:06:25 +01:00
Daniele Alessandri
aec3fcf3e8
Add a script to recreate a single PHP file from the repository.
2011-02-26 22:52:40 +01:00
Daniele Alessandri
1746948d61
Fix README (this is the last time).
2011-02-25 14:54:28 +01:00
Daniele Alessandri
d05007b5db
Fix README (again).
2011-02-25 14:51:16 +01:00
Daniele Alessandri
fa08ff1b18
Fix README.
2011-02-25 14:49:53 +01:00
Daniele Alessandri
9e0f0078ea
Rename test file.
2011-02-25 14:47:10 +01:00
Daniele Alessandri
4ad4b9cf77
Remove direct requires of parts of PHPUnit.
2011-02-25 12:45:11 +01:00
Daniele Alessandri
d2b0326087
Fix requiring path of bootstrap.php in external processes spawned by tests.
2011-02-25 12:39:05 +01:00
Daniele Alessandri
9f58d8a663
Register an autoloader function for examples.
2011-02-25 12:09:45 +01:00
Daniele Alessandri
c6b8336346
Update README and remove references to the PHP 5.2 backport for the current version.
2011-02-25 12:06:54 +01:00
Jordi Boggiano
ac1e6e1846
Fix tests for latest changes, added phpunit.xml.dist file and autoloader in test/bootstrap.php
2011-02-21 14:18:04 +01:00
Jordi Boggiano
30f908cd85
Convert monolithic one-file-lib to a proper PSR-0 file tree
2011-02-21 14:17:57 +01:00
Daniele Alessandri
2a78142b28
Remove comment, code will remain as-is for performance reasons.
2011-02-16 11:24:08 +01:00
Daniele Alessandri
978d7087d5
Minor formatting change.
2011-02-16 11:22:09 +01:00
Daniele Alessandri
97439a7e08
Update UNSTABLE.
2011-02-16 11:14:41 +01:00
Daniele Alessandri
5a25cf33be
Fix after incomplete rename of private fields.
2011-02-15 22:42:18 +01:00
Daniele Alessandri
237f3e3d7e
Rename the 'throw_on_error' client option to 'throw_errors'.
2011-02-15 18:24:38 +01:00
Daniele Alessandri
784b33358d
Check for null values when setting a protocol processor instance for a connection.
2011-02-15 18:05:02 +01:00
Daniele Alessandri
2b2ca8e8dc
Remove trailing spaces in code.
2011-02-15 12:46:19 +01:00
Daniele Alessandri
af03916369
Rename a couple of private fields.
2011-02-15 12:30:43 +01:00
Daniele Alessandri
8e4ef21b41
Update CHANGELOG.
2011-02-12 21:57:42 +01:00
Daniele Alessandri
65c530a13b
Add test guard for empty bulk replies.
2011-02-12 21:22:47 +01:00
Daniele Alessandri
dcafee61a8
Fix wrong method signature.
2011-02-12 21:07:27 +01:00
Jordi Boggiano
c1587ccf54
Fixed bug reading zero-length values from a bulk response
2011-02-12 19:16:16 +01:00
Daniele Alessandri
44839a7a6f
Minor fix in a comment.
2011-02-12 17:25:48 +01:00
Daniele Alessandri
9d6ffcc5f2
Update TODO.
2011-02-12 17:24:40 +01:00
Daniele Alessandri
679c7ffdd5
Trade a tiny bit of speed for more code reuse.
2011-02-12 16:58:31 +01:00
Daniele Alessandri
09a7a18ac0
Adapt the client features test suite to the new structure of the library.
2011-02-12 16:17:30 +01:00
Daniele Alessandri
03cff6a813
Fix wrong class lookup.
2011-02-12 16:17:00 +01:00
Daniele Alessandri
f6bd5757af
Repeat with me: do not blindly copy and paste.
2011-02-12 15:34:47 +01:00
Daniele Alessandri
8a145bc6c9
More reliable network writes in Predis\Protocols\TextProtocol.
2011-02-12 15:18:52 +01:00
Daniele Alessandri
fc3ee47140
Definitely remove support for Redis 1.0.
2011-02-12 15:05:56 +01:00
Daniele Alessandri
ddb3180700
Switch the default text protocol processor to the new and faster one.
2011-02-12 15:05:24 +01:00
Daniele Alessandri
f7bef784af
Add inline (p)subscribe via options on Predis\PubSubContext initialization.
2011-02-12 14:24:12 +01:00
Daniele Alessandri
c5d353b754
Update CHANGELOG.
2011-02-12 14:22:51 +01:00
Daniele Alessandri
fb2bc5c8e9
Bump year in LICENSE file.
2011-01-26 16:26:33 +01:00
Daniele Alessandri
68f77444b6
Use only one check for replies that should not be passed to a reply parser.
2011-01-14 17:08:45 +01:00
Daniele Alessandri
b6d93b5b34
Promote the profile for Redis 2.2 as stable and use it as the default one for the client.
2011-01-13 12:30:06 +01:00
Daniele Alessandri
4e6ed1fd5b
Do not use is_numeric() when it is not really needed (it is relatively slow).
2011-01-13 10:50:40 +01:00
Daniele Alessandri
fc9deb68be
Remove usage of constants in the protocol handlers.
2011-01-13 10:32:20 +01:00
Daniele Alessandri
b47adffd4f
Do not perform useless read operations in the bulk reply handler.
2011-01-13 10:28:39 +01:00
Daniele Alessandri
3d80ff489a
Less lines of code please.
2011-01-12 22:49:19 +01:00
Daniele Alessandri
4705b27302
Add the 'on_retry' callback as an option for Predis\MultiExecContext.
2011-01-12 22:46:58 +01:00
Daniele Alessandri
9877e0c380
Fix once and for all the implementation of Predis\Protocols\FastTextProtocol.
2011-01-12 22:27:45 +01:00
Daniele Alessandri
92e2455189
Remove unused variables.
2011-01-12 18:39:27 +01:00
Daniele Alessandri
e1d8ee5d9b
Remove useless reference passing.
2011-01-12 18:38:15 +01:00
Daniele Alessandri
74145ce45c
Fix server errors handling in Predis\Protocols\FastTextProtocol.
2011-01-12 18:31:54 +01:00
Daniele Alessandri
898b038f48
Do not make useless calls to fread.
2011-01-12 18:17:35 +01:00
Daniele Alessandri
aacf2bc65d
Make reads from the socket stream more reliable in Predis\Protocols\FastTextProtocol.
2011-01-12 18:07:09 +01:00
Daniele Alessandri
11c490e978
Minor adjustments.
2011-01-11 22:16:30 +01:00
Daniele Alessandri
db2469341f
Remove useless stuff.
2011-01-11 16:36:19 +01:00
Daniele Alessandri
c1108c6e92
Add an optional and faster protocol processor.
2011-01-10 12:59:04 +01:00
Daniele Alessandri
c9567c8606
Add an optional 'on_connection_initialized' callback to client options.
2011-01-10 12:20:52 +01:00
Daniele Alessandri
014adfe75d
Remove the method Predis\Network\TcpConnection::rawCommand().
2011-01-09 21:24:09 +01:00
Daniele Alessandri
2853ba7cef
Add the ability to set a different protocol processor on connection instances.
2011-01-09 15:55:55 +01:00
Daniele Alessandri
539a4bbdcd
Remove the Predis\ConnectionManager class.
...
The functionalities provided by that class have been merged into Predis\Client.
2011-01-09 15:42:36 +01:00
Daniele Alessandri
bf3776b47a
Improve initialization code of Predis\Client instances.
2011-01-09 15:05:28 +01:00
Daniele Alessandri
fe0a940f18
Add the new Predis\Protocols\IRedisProtocolExtended interface.
2011-01-09 14:53:20 +01:00
Daniele Alessandri
c5169694ef
Remove Predis\Client::setConnection().
2011-01-09 14:41:32 +01:00
Daniele Alessandri
a992d9d0b8
Better checks for arguments passed to Predis\ConnectionParameters.
2011-01-09 14:36:48 +01:00
Daniele Alessandri
c94cf5ef32
Better checks for arguments passed to Predis\Network\UnixDomainSocketConnection.
2011-01-09 14:36:10 +01:00
Daniele Alessandri
5d37ea1258
Remove useless override.
2011-01-09 14:24:13 +01:00
Daniele Alessandri
8392f465cc
Cache the generated connection ID.
2011-01-09 13:43:45 +01:00
Daniele Alessandri
b3e7cfe408
Make multiple explicit calls to Predis\Client::connect() possible.
2011-01-09 12:08:05 +01:00
Daniele Alessandri
b013bce140
Add missing method in the Predis\Network\IConnectionCluster interface.
2011-01-09 12:01:06 +01:00
Daniele Alessandri
f1488534b6
Reduce lines of code.
2011-01-09 11:58:45 +01:00
Daniele Alessandri
d1282261b8
Simplify the internals of Predis\Client when initializing a connection.
...
Note that the options set for a Predis\Network\IConnectionSingle instance
passed to the client are not automatically overridden anymore.
2011-01-09 11:49:40 +01:00
Daniele Alessandri
f1223c1a90
Simplify the signature of Predis\Client::pushInitCommands().
2011-01-09 10:59:54 +01:00
Daniele Alessandri
bcfb568d1a
Add new Predis\Client::getOptions() method.
2011-01-09 10:53:52 +01:00
Daniele Alessandri
48a47aa503
Add the Predis\Profiles\IServerProfile interface.
2011-01-09 10:46:54 +01:00
Daniele Alessandri
8eb59c8852
Add missing methods to Predis\Protocols\IRedisProtocol.
2011-01-08 20:09:23 +01:00
Daniele Alessandri
cd9995b972
Add missing 'use' directives.
2011-01-08 18:18:02 +01:00
Daniele Alessandri
131e4c9d03
Rewrite Predis\ConnectionParams to leverage the Predis\Options namespace.
2011-01-08 18:17:57 +01:00
Daniele Alessandri
cd828ab18a
Add the new Predis\Options namespace and optimize Predis\ClientOptions.
2011-01-08 17:37:53 +01:00
Daniele Alessandri
33b71a085c
Remove a useless method.
2011-01-08 01:57:47 +01:00
Daniele Alessandri
48762ec876
Fix argument name mismatch.
2011-01-08 01:42:39 +01:00
Daniele Alessandri
3b2681f2c8
Move some classes in new namespaces and refactor some code.
2011-01-08 00:45:46 +01:00
Daniele Alessandri
62b8569dc8
More changes but nothing set in stone yet.
...
The commands test suite passes all the assertions (woot!).
2011-01-07 20:35:39 +01:00
Daniele Alessandri
f4309893bc
Start a major rewrite of the internals of the library.
...
The public API of Predis\Client will be compatible with older releases, but
many of the core internal classes are going to change.
2011-01-07 17:50:54 +01:00
Daniele Alessandri
c247d6201a
Update README.
2011-01-06 11:48:41 +01:00
Daniele Alessandri
df268a1143
Merge branch 'pullreq_18'
2011-01-06 00:27:45 +01:00
Daniele Alessandri
d04c6d2670
Remove garbage.
2011-01-06 00:25:46 +01:00
Artur Kotyrba
8a76c8c849
Remove unused private method.
2011-01-05 23:03:53 +01:00
Daniele Alessandri
a7ae86689d
Test suite: client initialization using an instance of Predis\IConnectionCluster.
2011-01-05 23:03:34 +01:00
Daniele Alessandri
6de7222857
Revert changes to the test suite in 6a7fc49.
2011-01-05 22:55:15 +01:00
Artur Kotyrba
fb30e22c30
Added possibility to use custom connection cluster classes in Predis\Client constructor.
...
Added three methods (used by \Predis\Client) to IConnectionSingle interface.
2011-01-05 22:05:21 +01:00
Daniele Alessandri
2bb763dbf6
Minor code style change.
2011-01-05 12:50:33 +01:00
Daniele Alessandri
afff56d2ec
Look for a closing curly brace in a string only after the index of the opening one when using key tags.
2011-01-05 12:49:08 +01:00
Daniele Alessandri
d717d906e8
Optimize when a pair of curly brackets for key tagging is missing.
2011-01-05 12:44:37 +01:00
Daniele Alessandri
51352bcbb3
Create a new class to handle the old response type of KEYS (Redis v1.2).
2011-01-04 21:01:29 +01:00
Daniele Alessandri
2b809325e0
Use a faster method to detect errors when reading a line from the server.
2011-01-04 11:08:55 +01:00
Daniele Alessandri
306ed28c5d
Reuse code a bit.
2011-01-04 10:55:39 +01:00
Daniele Alessandri
d94ad9942f
Use a local cache for handlers while iterating chunks of a multi-bulk reply.
2011-01-04 10:34:56 +01:00
Daniele Alessandri
dcbd943505
Reduce overhead by directly managing reply handlers for multibulk replies.
2011-01-04 10:31:34 +01:00
Daniele Alessandri
b74e2c22f7
Rewrite the bulk reply handler (more compact and faster code).
2011-01-02 22:22:07 +01:00
Daniele Alessandri
48728d2672
More strict check of the length argument for a network read.
2011-01-02 22:05:27 +01:00
Daniele Alessandri
e134e21b78
Remove a useless check for the payload length.
2011-01-02 21:55:28 +01:00
Daniele Alessandri
f0f1647773
Use an explicit index to add values to the multi-bulk reply array.
2011-01-02 21:51:53 +01:00
Daniele Alessandri
d270205a8c
Nothing fancy, and hardly an optimization.
2011-01-02 21:50:14 +01:00
Daniele Alessandri
a1db042d17
Avoid allocating an iterator to traverse the arguments list of a command.
2011-01-02 21:42:54 +01:00
Daniele Alessandri
e645ed7d3f
Preallocate an empty array for empty command arguments.
2011-01-02 21:35:43 +01:00
Daniele Alessandri
9ae69e6c51
Update CHANGELOG.
2011-01-01 19:01:34 +01:00
Daniele Alessandri
3a46f8a7c5
Update README to reflect public API changes.
2011-01-01 15:05:00 +01:00
Daniele Alessandri
b202e6cae7
Make Predis\Client::setProfile() private.
2011-01-01 14:59:38 +01:00
Daniele Alessandri
5ca82fb56b
Code style changes only.
2011-01-01 13:06:43 +01:00
Daniele Alessandri
1530c7c0d6
Cannot execute with a transaction block after using fluent interface style with Predis\MultiExecBlock.
2011-01-01 11:49:05 +01:00
Daniele Alessandri
11b2f3aca3
Improve fluent-interface style for transactions with CAS.
2011-01-01 11:35:48 +01:00
Daniele Alessandri
6b82b412fb
Cannot use the 'retry' option for transactions without providing a function block.
2011-01-01 11:32:23 +01:00
Daniele Alessandri
858d7372ca
Add an example for MULTI/EXEC transactions using CAS.
2010-12-31 19:41:31 +01:00
Daniele Alessandri
99042f6b9c
Do not fail with empty transactions when using CAS.
2010-12-31 19:40:59 +01:00
Daniele Alessandri
725d5abe4a
Update README.
2010-12-31 19:01:01 +01:00
Daniele Alessandri
46b56437a4
Fix and optimize WATCH with CAS.
2010-12-31 18:55:04 +01:00
Daniele Alessandri
4a497eea79
Add support for optional automatic retries upon aborted transactions.
2010-12-31 18:53:13 +01:00
Daniele Alessandri
cf21a43211
Support DISCARD with CAS.
2010-12-31 16:17:31 +01:00
Daniele Alessandri
70487bbfb3
Add support for check-and-set (CAS) for transactions with Predis\MultiExecBlock.
2010-12-31 16:17:24 +01:00
Daniele Alessandri
922beeceea
Test suite: tiny fix in a test for LINSERT (again, this time for real).
2010-12-31 16:16:54 +01:00
Daniele Alessandri
02d7400d1f
Test suite: tiny fix in a test for LINSERT.
2010-12-21 18:36:43 +01:00
Daniele Alessandri
3a2e977ee0
Test suite: temporary fix for testSetExpire().
2010-12-18 17:44:06 +01:00
Daniele Alessandri
eac195eaea
Remove unused class.
2010-12-18 17:43:41 +01:00
Daniele Alessandri
daf88645f2
New command: BRPOPLPUSH (Redis v2.2-dev).
...
Conflicts:
lib/Predis.php
2010-12-18 17:40:30 +01:00
Daniele Alessandri
ecc7499b47
Test suite: move up testStrlen().
2010-12-18 17:39:17 +01:00
Daniele Alessandri
64cb73fbb9
New command: GETBIT (Redis v2.2-dev).
...
Conflicts:
lib/Predis.php
2010-12-18 17:38:49 +01:00
Daniele Alessandri
0b9bca8ce1
New command: SETBIT (Redis v2.2-dev).
...
Conflicts:
lib/Predis.php
2010-12-18 17:36:48 +01:00
Daniele Alessandri
e1924551b1
New command: SETRANGE (Redis v2.2-dev).
...
Conflicts:
lib/Predis.php
2010-12-18 17:33:15 +01:00
Daniele Alessandri
171a28fe26
New command: GETRANGE (Redis v2.2-dev - replaces SUBSTR).
2010-12-18 17:29:32 +01:00
Daniele Alessandri
ca5cd2f42a
Update CHANGELOG.
2010-11-28 21:16:57 +01:00
Daniele Alessandri
1e4661cfc8
Overridden methods for UNWATCH and DISCARD in Predis\MultiExecBlock must return $this to not break method chaining.
2010-11-28 19:19:20 +01:00
Daniele Alessandri
e146fa9e65
Fix a bunch of broken tests.
2010-11-28 17:17:39 +01:00
Daniele Alessandri
21b3fdb3e1
New command: PERSIST (Redis v2.2-dev).
2010-11-28 16:35:25 +01:00
Daniele Alessandri
cd9dbb763e
Update CHANGELOG.
2010-11-28 14:07:03 +01:00
Daniele Alessandri
fffa7acd83
Add support for UNIX domain sockets.
2010-11-28 13:58:09 +01:00
Daniele Alessandri
f419d15f82
New command: ZREVRANGEBYSCORE (Redis v2.2-dev).
2010-11-27 12:55:39 +01:00
Daniele Alessandri
7b1713398d
Make WATCH accept an array of keys that must be watched.
2010-09-25 17:52:04 +02:00
Daniele Alessandri
bbc94863d1
Update CHANGELOG.
2010-09-25 16:25:14 +02:00
Daniele Alessandri
9e58ad7648
Test suite: move the trigger guard for the test suite in the common included file.
2010-09-25 16:15:45 +02:00
Daniele Alessandri
1d45649f86
Test suite: add test for WATCH in Predis\MultiExecBlock.
2010-09-25 16:15:13 +02:00
Daniele Alessandri
29f18254bb
Fix improper handling of a few corner cases for Predis\MultiExecBlock and send DISCARD to the server on uncaught exceptions inside a callable block.
2010-09-25 15:06:03 +02:00
Daniele Alessandri
4c8f31f532
Fix bad handling of empty MULTI/EXEC contexts (MULTI should not even be sent to the server).
2010-09-25 14:26:50 +02:00
Daniele Alessandri
96e7a58f9f
Test suite: add missing tests for Predis\MultiExecBlock.
2010-09-25 14:23:22 +02:00
Daniele Alessandri
c131d2f7b6
Fix an infinite recursion loop when calling Predis\Client::multiExec() (ISSUE #14 ).
2010-09-24 23:02:08 +02:00
Daniele Alessandri
fc8f363fe5
New commands: RPUSHX, LPUSHX (Redis v2.2-dev).
2010-09-21 17:33:24 +02:00
Daniele Alessandri
49a140e3af
New command: LINSERT (Redis v2.2-dev).
2010-09-21 17:22:26 +02:00
Daniele Alessandri
73b4760fc4
New command: STRLEN (Redis v2.2-dev).
2010-09-21 16:56:52 +02:00
Daniele Alessandri
8f601b8420
Slight micro-optimization.
2010-09-21 15:55:02 +02:00
Daniele Alessandri
4a6bab995e
Update CHANGELOG.
2010-09-18 19:09:54 +02:00
Daniele Alessandri
b3ea36f3fa
Add a new example.
2010-09-18 18:54:57 +02:00
Daniele Alessandri
8769567c7e
Remove Predis\Client::rawCommand() due to interface inconsistencies.
2010-09-18 18:31:05 +02:00
Daniele Alessandri
5124fd1d43
Push initialization commands already created instances of Predis\IConnectionSingle.
2010-09-18 18:26:23 +02:00
Daniele Alessandri
2eec3929fb
Get the connection out of a cluster only once inside Predis\Client::getClientFor().
2010-09-18 17:05:54 +02:00
Daniele Alessandri
aa0ea048ae
Accept instances of Predis\IConnection or Predis\ConnectionParameters as parameters for the constructor of Predis\Client.
2010-09-18 14:56:53 +02:00
Daniele Alessandri
f67082072d
Perform (p)unsubscribtion only if (p)subscribed to a channel when the destructor for Predis\PubSubContext is invoked.
2010-09-17 22:23:29 +02:00
Daniele Alessandri
ac5f34b0ad
Make arguments handling more solid for the SORT command.
2010-09-17 22:10:05 +02:00
Daniele Alessandri
78f11f1a0f
Remove useless code duplication.
2010-09-17 21:55:25 +02:00
Daniele Alessandri
9468891faf
Fix checks on the value for the STORE argument (ISSUE #13 ).
2010-09-17 11:36:17 +02:00
Daniele Alessandri
9b849d49c0
Remove some ugly code. And by ugly, I mean really ugly.
2010-08-15 19:15:58 +02:00
Daniele Alessandri
ff2129bddf
Update CHANGELOG.
2010-08-15 18:38:41 +02:00
Daniele Alessandri
b40c2fd214
Remove the static method Predis\Client::create().
2010-08-15 17:58:45 +02:00
Daniele Alessandri
3487cc219c
Remove the method Predis\Client::pipelineSafe().
2010-08-15 17:52:08 +02:00
Daniele Alessandri
4aca9852fe
Update CHANGELOG.
2010-08-15 17:29:08 +02:00
Daniele Alessandri
104bfa3332
Move some common code for connections in the Predis\Connection class.
2010-08-15 16:26:37 +02:00
Daniele Alessandri
68397fe958
Rename Predis\Connection to Predis\ConnectionFactory and disallow the creation of instances for this class.
2010-08-15 15:57:24 +02:00
Daniele Alessandri
8428f9916a
More code clean-ups.
2010-08-15 15:08:35 +02:00
Daniele Alessandri
2aec7bfeda
Leverage the 'use' statement to make the code a bit shorter and cleaner.
2010-08-15 14:52:47 +02:00
Daniele Alessandri
870a7b9e78
Update CHANGELOG.
2010-08-15 12:08:36 +02:00
Daniele Alessandri
b4b06acfe7
Add the Predis\ICommand interface.
2010-08-15 11:43:03 +02:00
Daniele Alessandri
fbd5059fb2
Do not use magic methods to serialize the command buffer: rename Predis\Command::__invoke() to Predis\Command::serialize().
2010-08-15 11:34:24 +02:00
Daniele Alessandri
c5f6ca1d90
Test suite: update client tests.
2010-08-15 11:25:56 +02:00
Daniele Alessandri
6ea96e82f9
Make Predis\Command::serializeRequest() a protected method.
2010-08-15 11:20:39 +02:00
Daniele Alessandri
e7b8b50dda
Merge the serialization of Predis\MultiBulkCommand into Predis\Command since it is the preferred way to send commands to Redis servers >= 1.2.
2010-08-15 11:16:30 +02:00
Daniele Alessandri
a1f202527f
Do not implicitly extract arguments for multi-bulk commands when the first (and only) element of the arguments array is an array itself.
2010-08-15 11:02:48 +02:00
Daniele Alessandri
01b59a546c
Update CHANGELOG.
2010-07-30 19:38:51 +02:00
Daniele Alessandri
565a647a3d
Drop support for long method names for commands and move support for Redis v1.0 into a separate file under the new addons subdirectory.
2010-07-30 19:19:23 +02:00
Daniele Alessandri
9c494c6052
Update CHANGELOG.
2010-07-11 17:13:59 +02:00
Daniele Alessandri
46f5408490
Update CHANGELOG.
2010-07-11 17:13:49 +02:00
Daniele Alessandri
1520e2c48b
Test suite: add a test for the LIMIT modifier of ZRANGEBYSCORE configured via associative array.
2010-07-11 17:07:56 +02:00
Daniele Alessandri
618708b853
Fix handling of the WEIGHT modifier for ZUNIONSTORE and ZINTERSTORE with more than two weights specified.
2010-07-11 16:40:27 +02:00
Daniele Alessandri
ad48369a6b
Update CHANGELOG.
2010-07-11 16:40:18 +02:00
Daniele Alessandri
802e77da26
Update CHANGELOG.
2010-07-11 15:32:33 +02:00
Daniele Alessandri
4dc1099103
Update CHANGELOG.
2010-07-07 20:17:44 +02:00
Daniele Alessandri
f1df8b163c
Add tests for the new options handling for the ZRANGE commands family.
2010-07-07 20:17:32 +02:00
Daniele Alessandri
12298d599b
Add support for the LIMIT modifier in ZRANGEBYSCORE.
2010-07-07 20:17:22 +02:00
Daniele Alessandri
d2cd1b70b8
ZRANGE, ZREVRANGE and ZRANGEBYSCORE accepts an array instance for optional modifiers.
2010-07-07 20:17:14 +02:00
Daniele Alessandri
7d447f8493
More appropriate type-check to detect clustered connections.
2010-07-02 22:38:16 +02:00
Daniele Alessandri
9f21f5a635
Code formatting.
2010-07-02 22:29:47 +02:00
Daniele Alessandri
e3ae04437c
First stub of the Predis\Compatibility class. Things will most probably change later.
2010-07-02 22:19:57 +02:00
Daniele Alessandri
2af73f4fa1
Deprecate long method names for Redis commands and move them into new server profiles available in the Predis_Compatibility.php file.
2010-07-02 21:52:56 +02:00
Daniele Alessandri
a4df829b19
Deprecate Predis\InlineCommand and Predis\BulkCommand. Those classes are made available through the Predis_Compatibility.php file.
2010-07-02 20:58:15 +02:00
Daniele Alessandri
22807e8163
Bump version number.
2010-07-02 20:55:04 +02:00
Daniele Alessandri
1bb04baf78
Merge branch 'version-0.6'
...
Conflicts:
lib/Predis.php
2010-07-02 20:51:18 +02:00
Daniele Alessandri
f073bc8f70
Update CHANGELOG.
2010-06-30 16:24:02 +02:00
Daniele Alessandri
50970c003b
Accept instances of Predis\ConnectionParameters in Predis\Client::__construct().
2010-06-30 16:17:19 +02:00
Daniele Alessandri
34cfebdc14
Update CHANGELOG.
2010-06-29 20:47:36 +02:00
Daniele Alessandri
735c92089c
Update CHANGELOG.
2010-06-29 20:15:03 +02:00
Daniele Alessandri
3853e62d34
Make sure that Predis\MultiExecBlock and Predis\PubSubContext are not initialized over a cluster of connections.
2010-06-29 20:07:57 +02:00
Daniele Alessandri
ed105ab4fc
Centralize code used to check if a connection object instance is a cluster of connections.
2010-06-29 20:07:51 +02:00
Daniele Alessandri
adb489b4d3
Internal optimizations for the Predis\PubSubContext class.
2010-06-29 14:39:24 +02:00
Daniele Alessandri
6d1c4a2096
Update CHANGELOG.
2010-06-26 12:54:12 +02:00
Daniele Alessandri
5cf10ddbfa
Add support for variable arguments in Predis\Client::pipeline().
2010-06-26 12:49:57 +02:00
Daniele Alessandri
5defb14698
Merge branch 'connections'
2010-06-24 17:23:01 +02:00
Daniele Alessandri
3b74aa8f82
Update CHANGELOG.
2010-06-12 11:04:23 +02:00
Daniele Alessandri
ac2b718387
Handle aborted MULTI/EXEC transactions.
2010-06-12 10:52:45 +02:00
Daniele Alessandri
89e46912a2
Add support for variable arguments in Predis\Client::multiExec().
2010-06-12 10:40:28 +02:00
Daniele Alessandri
200d864df3
Parse WATCH and UNWATCH replies as boolean values.
2010-06-12 10:12:07 +02:00
Daniele Alessandri
35b8588dc4
Check for the capabilities of the passed client instance when initializing a \Predis\PubSubContext instance.
2010-06-12 10:06:13 +02:00
Daniele Alessandri
371a7ad69b
Less code duplication please.
2010-06-12 09:59:20 +02:00
Daniele Alessandri
5ae476ee16
Check for the capabilities of the passed client instance when initializing a \Predis\MultiExecBlock instance.
2010-06-12 09:52:32 +02:00
Daniele Alessandri
f4f19ace0a
Adopt more consistent behaviours for \Predis\MultiExecBlock.
2010-06-12 09:27:59 +02:00
Daniele Alessandri
50092d1421
Start adding support for WATCH/UNWATCH to \Predis\MultiExecBlock.
2010-06-12 08:57:42 +02:00
Daniele Alessandri
5287bb2387
New commands: WATCH and UNWATCH (Redis v2.2-dev).
2010-06-12 08:16:00 +02:00
Daniele Alessandri
66a0458018
Leverage the global connection creator facility to alias the 'redis' scheme to the 'tcp' scheme.
2010-06-10 20:37:34 +02:00
Daniele Alessandri
2543bb30cc
Map URI schemes to connection classes.
2010-06-10 19:47:40 +02:00
Daniele Alessandri
1fd715e7a5
Prepare to return the appropriate instance of Predis\IConnectionSingle based on the URI scheme.
2010-06-10 11:47:09 +02:00
Daniele Alessandri
e191d0a7ce
Add required methods to Predis\IConnectionSingle and Predis\IConnectionCluster interfaces.
2010-06-10 11:26:12 +02:00
Daniele Alessandri
a2c9cb38a5
Accept the 'scheme' argument for Predis\ConnectionParameters. The 'redis' scheme is now an alias of 'tcp' for compatibility with older versions of Predis.
2010-06-10 11:19:14 +02:00
Daniele Alessandri
72c41a25cb
Rename Predis\Connection to Predis\TcpConnection.
2010-06-10 10:40:09 +02:00
Daniele Alessandri
b5a6c4e5c3
The Connection class now implements the new IConnectionSingle interface. Guess what is about to happen...
2010-06-09 20:56:25 +02:00
Daniele Alessandri
dd07c12402
Clean up leftovers.
2010-06-09 19:10:10 +02:00
Daniele Alessandri
42aa8333fc
Slight optimization for multibulk replies.
2010-06-09 19:06:04 +02:00
Daniele Alessandri
25ac5c3ca4
Make Predis\Command::getArguments() a public method.
2010-06-09 19:04:31 +02:00
Daniele Alessandri
3c33c74b35
Update CHANGELOG. Time to release!
2010-05-24 19:35:35 +02:00
Daniele Alessandri
0e69438c0b
Remove dots at the end of exception messages.
2010-05-23 09:08:55 +02:00
Daniele Alessandri
761e3a2527
Add an optional argument to MultiBulkResponseIterator::sync() to specify if the synchronization of an iterable multibulk response should be performed by consuming the rest of the reply or by closing the underlying connection.
2010-05-23 09:03:17 +02:00
Daniele Alessandri
316d3de10e
Add static method Predis\RedisServerProfile::getDevelopment() to create a new instance of the 'dev' server profile.
2010-05-23 08:47:29 +02:00
Daniele Alessandri
5757318c9b
Remove Predis\RedisServerProfile::compareWith() since it is useless and it is broken anyway.
2010-05-23 08:45:22 +02:00
Daniele Alessandri
340dca8f8d
Update CHANGELOG.
2010-05-23 08:44:19 +02:00
Daniele Alessandri
c781e91c2e
Fix typos.
2010-05-22 16:10:17 +02:00
Daniele Alessandri
d04a95395d
Update CHANGELOG.
2010-05-22 15:38:33 +02:00
Daniele Alessandri
dad3704488
Examples: bulk update.
2010-05-22 14:48:37 +02:00
Daniele Alessandri
d585b11bf5
Examples: add CustomDistributionStrategy.php
2010-05-22 14:34:28 +02:00
Daniele Alessandri
9f21cb12a2
Rename Predis\Distribution\IDistributionAlgorithm to Predis\Distribution\IDistributionStrategy.
2010-05-22 14:32:29 +02:00
Daniele Alessandri
f60208eb54
Examples: updated PubSubContext.php
2010-05-22 13:59:16 +02:00
Daniele Alessandri
f53ffbf42b
Update TODO.
2010-05-22 13:52:30 +02:00
Daniele Alessandri
c2a6350ff2
Update CHANGELOG.
2010-05-22 13:45:51 +02:00
Daniele Alessandri
57fc3cf30e
Add VERSION file.
2010-05-22 13:30:56 +02:00
Daniele Alessandri
2aecdf25e5
Update README.
2010-05-22 13:24:04 +02:00
Daniele Alessandri
8ad161dc34
Update CHANGELOG. Start preparing for the release of Predis 0.6.0.
2010-05-22 13:07:10 +02:00
Daniele Alessandri
69a0ed6d2f
Suppress PHP notices in Predis\ConnectionCluster::getConnectionById() if the specified connection alias/index does not exist.
2010-05-22 12:27:14 +02:00
Daniele Alessandri
1f663f06be
Implement Predis\Client::getClientFor() to initialize a new client from a single connection of a cluster by its alias.
2010-05-22 12:22:34 +02:00
Daniele Alessandri
5427bdcf22
Fast fail on exceptions different than Predis\ServerException or Predis\CommunicationException.
2010-05-22 11:56:45 +02:00
Daniele Alessandri
6c512784cb
Merge branch 'pipeline_partial_failures'
...
Conflicts:
lib/Predis.php
2010-05-22 11:34:57 +02:00
Daniele Alessandri
e70b8ed38b
Fix an old but harmless glitch in the serialization of inline commands with 0 arguments.
2010-05-21 21:10:34 +02:00
Daniele Alessandri
40d5b04278
Change the behavior of a test and add a reminder for a later in-depth examination of alternatives.
2010-05-21 21:02:09 +02:00
Daniele Alessandri
71dab9a249
Update CHANGELOG.
2010-05-21 20:45:14 +02:00
Daniele Alessandri
f0d2551244
Fix a wrong namespace path in SafeExecutor::execute().
2010-05-21 20:34:20 +02:00
Daniele Alessandri
4c8ecc02e5
Force disconnection in Predis\Pipeline\StandardExecutor when a Predis\ServerException is thrown to prevent protocol desynchronization between the client and the server.
2010-05-21 20:31:40 +02:00
Daniele Alessandri
84cb28e3ac
Merge branch 'pubsub_experimental'
2010-05-18 12:25:10 +02:00
Daniele Alessandri
6e321a3530
Add the Predis\Client::pubSubContext() method to initialize a PubSub context from a client instance.
2010-05-18 12:23:53 +02:00
Daniele Alessandri
ea7e9a37c6
Remove unused variable in the pubsub example.
2010-05-18 11:54:59 +02:00
Daniele Alessandri
658272fe4b
Fix wrong namespace path for EmptyRingException.
2010-05-18 11:46:42 +02:00
Daniele Alessandri
fa6400dc22
Rename the \Predis\Utilities namespace to \Predis\Shared.
2010-05-17 20:05:10 +02:00
Daniele Alessandri
376dfe3451
Move IDistributionAlgorithm, HashRing and KetamaPureRing to the new Predis\Distribution namespace.
2010-05-17 19:59:54 +02:00
Daniele Alessandri
a26932b3b5
Throw a more appropriate InvalidArgumentException when a non-callable argument is passed to instances of Predis\CommandPipeline and Predis\MultiExecBlock.
2010-05-17 19:46:28 +02:00
Daniele Alessandri
eab70fb134
Implement the new EmptyRingException exception class.
2010-05-17 19:42:08 +02:00
Daniele Alessandri
23b68d9415
Test suite: add test for the HASH type.
2010-05-17 19:19:53 +02:00
Daniele Alessandri
5def6bebe3
Rename Predis\Pipeline\IExecutor to Predis\Pipeline\IPipelineExecutor.
2010-05-17 18:38:38 +02:00
Daniele Alessandri
35f7ea2895
Test suite: minor code formatting changes.
2010-05-16 13:00:01 +02:00
Daniele Alessandri
37d4aa3d94
Test suite: test creation of the server profile for Redis 2.0.
2010-05-16 12:29:19 +02:00
Daniele Alessandri
f1890c93a6
Test suite: PredisClientFeaturesTestSuite and same signature of PHPUnit_Framework_TestCase::onNotSuccessfulTest.
2010-05-16 12:23:50 +02:00
Daniele Alessandri
d69a872359
Test suite: minor code formatting changes.
2010-05-16 12:20:20 +02:00
Daniele Alessandri
c01d185448
Bugfix: using the right variable in Predis\Pipeline\SafeExecutor makes things work.
2010-05-15 13:52:05 +02:00
Daniele Alessandri
e4aec82836
Garbage in the LICENSE file. Seriously, what was that?
2010-05-15 13:08:06 +02:00
Daniele Alessandri
82619b4dd0
Updated CHANGELOG.
2010-05-15 13:06:08 +02:00
Daniele Alessandri
b3f340f830
Handling of partial failures and server errors in pipelines.
2010-05-15 12:30:33 +02:00
Daniele Alessandri
f7bdd9d64b
The default server profile for Predis\Client is now 2.0 (supports for Redis v2.0 out of the box).
2010-05-15 08:30:55 +02:00
Daniele Alessandri
4f0f2ca3eb
ZUNION and ZINTER have been changed to ZUNIONSTORE and ZINTERSTORE for consistency (see Redis commit 5d373da).
2010-05-15 08:25:50 +02:00
Daniele Alessandri
72ef71d2df
Merge branch 'test_library_features'
2010-05-13 18:53:21 +02:00
Daniele Alessandri
1a9454a4f2
Updated the tests to reflect the changes that has been made in the internal design of the library in the latest weeks (preparing to merge into master).
2010-05-13 18:52:51 +02:00
Daniele Alessandri
f6b3912783
Updated TODO.
2010-05-13 16:11:40 +02:00
Daniele Alessandri
a0f441f21b
Added an example to show how to use the \Predis\PubSubContext class.
2010-05-13 16:10:18 +02:00
Daniele Alessandri
7312dbe7fc
Implemented the new \Predis\PubSubContext class.
2010-05-13 16:07:42 +02:00
Daniele Alessandri
27ebb1ddb5
New commands: PSUBSCRIBE and PUNSUBSCRIBE (Redis v2.0-dev).
2010-05-13 11:21:59 +02:00
Daniele Alessandri
08afdfac1b
Trying to increment a string value associated to an hash now raises an error.
2010-05-10 11:27:26 +02:00
Daniele Alessandri
0664bde7e9
Bugfix: replies to DEL commands must not be converted to a boolean response as DEL returns the number of keys removed.
2010-05-10 11:20:51 +02:00
Daniele Alessandri
ddafa2a101
Updated TODO.
2010-04-27 21:55:07 +02:00
Daniele Alessandri
2787905024
Test suite: updated tests for ZUNION and ZINTER with the new options style.
2010-04-27 21:54:37 +02:00
Daniele Alessandri
b623144881
Better support for options for ZUNION and ZINTER.
2010-04-27 21:49:03 +02:00
Daniele Alessandri
c73918b991
Fix a couple of command aliases in the DEV profile.
2010-04-24 14:01:24 +02:00
Daniele Alessandri
b4e4ca0f0b
Updated TODO.
2010-04-24 13:59:11 +02:00
Daniele Alessandri
db6b8a3fc8
Parse response to HGETALL as an array of key => value.
2010-04-24 13:56:00 +02:00
Daniele Alessandri
0d4426c052
Test suite: added HKEYS, HVALS, HGETALL.
2010-04-24 13:54:06 +02:00
Daniele Alessandri
08adcb478d
Test suite: added HLEN.
2010-04-24 13:16:34 +02:00
Daniele Alessandri
513baa556c
Process responses to HDEL as boolean values.
2010-04-24 13:09:18 +02:00
Daniele Alessandri
ead414c530
Test suite: added HDEL.
2010-04-24 13:09:05 +02:00
Daniele Alessandri
290e51877c
Test suite: added HINCRBY.
2010-04-24 13:03:14 +02:00
Daniele Alessandri
de2d75e1d7
Process responses to HEXISTS as boolean values.
2010-04-24 12:47:09 +02:00
Daniele Alessandri
7e61ac6f30
Test suite: added HEXISTS.
2010-04-24 12:45:34 +02:00
Daniele Alessandri
4f25e568cf
Test suite: minor code formatting fix.
2010-04-24 12:42:37 +02:00
Daniele Alessandri
83ffdc8bc8
Various fixes for HMSET and HMSET.
2010-04-24 12:00:46 +02:00
Daniele Alessandri
7f138dfcef
Test suite: added HMSET and HMGET.
2010-04-24 11:59:30 +02:00
Daniele Alessandri
55404a2400
Test suite: added HSETNX.
2010-04-24 11:37:09 +02:00
Daniele Alessandri
69bce63453
Test suite: added HGET.
2010-04-24 11:33:48 +02:00
Daniele Alessandri
d79321ac8c
Process responses to HSET as boolean values.
2010-04-24 11:26:35 +02:00
Daniele Alessandri
c227eedbb7
Test suite: added HSET.
2010-04-24 11:24:55 +02:00
Daniele Alessandri
887fea87e5
Test suite: added ZREMRANGEBYRANK.
2010-04-24 11:12:35 +02:00
Daniele Alessandri
4b2400b570
Test suite: added ZINTER.
2010-04-24 10:26:34 +02:00
Daniele Alessandri
a1c8568ccf
Test suite: added ZUNION.
2010-04-24 10:21:29 +02:00
Daniele Alessandri
fa039fe500
Test suite: renamed ZRANK test method.
2010-04-24 09:47:10 +02:00
Daniele Alessandri
9c587b6f1d
Test suite: added ZREVRANK.
2010-04-24 09:46:32 +02:00
Daniele Alessandri
2f6b24c098
Test suite: added SETEX.
2010-04-24 09:37:54 +02:00
Daniele Alessandri
23de93582e
Code formatting.
2010-04-24 09:19:51 +02:00
Daniele Alessandri
e8a443200b
Updated CHANGELOG.
2010-04-23 21:38:43 +02:00
Daniele Alessandri
2eb68a0fee
New command: SETEX (Redis v2.0-dev).
2010-04-23 21:38:22 +02:00
Daniele Alessandri
77c8b702b6
Updated CHANGELOG.
2010-04-23 21:33:30 +02:00
Daniele Alessandri
a092ad46a3
New command: HSETNX (Redis v2.0-dev).
2010-04-23 21:32:10 +02:00
Daniele Alessandri
b5e2b9eee9
New command: HMGET (Redis v2.0-dev).
2010-04-23 21:28:43 +02:00
Daniele Alessandri
7c2866f9fc
Updating comments.
2010-04-23 21:23:23 +02:00
Daniele Alessandri
801c4647fd
Slight code reorganization.
2010-04-23 21:22:46 +02:00
Daniele Alessandri
0e224ec492
Updated CHANGELOG.
2010-04-23 21:18:33 +02:00
Daniele Alessandri
b93b13133d
New command: HMSET (Redis v2.0-dev).
2010-04-23 21:12:46 +02:00
Daniele Alessandri
d9542c21c3
New commands: PUBLISH, SUBSCRIBE and UNSUBSCRIBE (Redis v2.0-dev).
2010-04-23 21:07:36 +02:00
Daniele Alessandri
0a0afec0ec
Reminder for ZUNION.
2010-04-23 20:54:41 +02:00
Daniele Alessandri
7ae94ca6fb
New \Predis\Protocol class. It's not really used right now...
2010-04-23 20:37:57 +02:00
Daniele Alessandri
df9fef8900
Moved the IDistributionAlgorithm interface one level up in the namespace chain, from \Predis\Utilities to \Predis.
2010-04-23 20:27:59 +02:00
Daniele Alessandri
d369f8bb74
Renamed the \Predis\Utilities\IRing interface to \Predis\Utilities\IDistributionAlgorithm.
2010-04-21 22:13:13 +02:00
Daniele Alessandri
8ae5197a38
Moved the initialization of the default \Predis\ResponseReader instance.
2010-04-21 21:32:19 +02:00
Daniele Alessandri
b662b36e95
Updated CHANGELOG.
2010-04-19 20:51:17 +02:00
Daniele Alessandri
ce790071fd
Providing optional support for Redis 1.0.
2010-04-19 16:52:49 +02:00
Daniele Alessandri
f729793a9a
Drop default support for Redis 1.0 and switch to the multi-bulk type for all of the Redis commands.
2010-04-19 16:50:50 +02:00
Daniele Alessandri
ad2381a305
Users can now register their own \Predis\RedisServerProfile class with one or more aliases.
2010-04-19 15:37:43 +02:00
Daniele Alessandri
3121b1761e
Changed the way arguments of SORT are prepared before serialization to be compatible with an eventual switch to multi-bulk requests.
2010-04-18 14:33:22 +02:00
Daniele Alessandri
81aef81b55
Changed the way arguments of SLAVEOF are prepared before serialization to be compatible with an eventual switch to multi-bulk requests.
2010-04-18 13:09:03 +02:00
Daniele Alessandri
ea9c3388da
No more implicit serialization for an array instance passed as the single argument of a MultiBulkCommand.
2010-04-18 12:49:38 +02:00
Daniele Alessandri
24bf10c691
Some performance improvements in the serialization of multibulk commands.
2010-04-18 10:53:38 +02:00
Daniele Alessandri
ea75b168d1
Re-enabled the test for SORT in the test suite.
2010-04-17 20:12:39 +02:00
Daniele Alessandri
9fc0fbdb8c
Converted the test suite to invoke commands on the client instance as they are defined in the command reference of Redis instead of using their aliases.
2010-04-17 19:50:24 +02:00
Daniele Alessandri
a35faf2df6
Fixed a bug in the registration of the RPOPLPUSH command.
2010-04-17 18:48:13 +02:00
Daniele Alessandri
471102253a
Updated the tests to reflect the changes that has been made in the internal design of the library in the latest weeks.
2010-04-17 17:04:06 +02:00
Daniele Alessandri
4cce99d388
Merge branch 'test_client_feats' into test_library_features
2010-04-17 17:02:36 +02:00
Daniele Alessandri
39052b181e
Merge branch 'hyves_contribs_port' into master. Huge thanks to Lorenzo Castelli for a lot of awesome improvements and ideas.
2010-04-17 15:26:21 +02:00
Daniele Alessandri
fd0732ca33
Updated CHANGELOG.
2010-04-17 15:14:03 +02:00
Daniele Alessandri
14c9d36bdf
Updated CHANGELOG.
2010-04-17 15:13:48 +02:00
Daniele Alessandri
323b6f9eff
Updated README.
2010-04-17 15:12:31 +02:00
Daniele Alessandri
835f5a5cbc
Added Lorenzo to the contributors list.
2010-04-17 14:51:43 +02:00
Daniele Alessandri
fa22d9667c
Get a Predis\ResponseError instance from a Predis\ServerException instance.
2010-04-17 09:13:32 +02:00
Daniele Alessandri
67a27a7f05
Fixed a bug in the test suite discovered thanks to the validation of numeric inputs introduced in Redis with commit bbe025e.
2010-04-15 11:55:15 +02:00
Daniele Alessandri
bdf4dfb54e
Fixed the test suite to comply with the changes introduced in Redis with commit 4e27f26.
2010-04-15 11:51:33 +02:00
Daniele Alessandri
a3ead444b2
Removed a spurious new line.
2010-04-14 15:52:35 +02:00
Daniele Alessandri
9facda2678
Updated CHANGELOG.
2010-04-14 15:51:08 +02:00
Daniele Alessandri
8f50c5f69a
User-configurable key distribution algorithm to be used for clustered connections.
2010-04-14 15:03:27 +02:00
Daniele Alessandri
0e52825d97
Merge branch 'client_options' into hyves_contribs_port
2010-04-14 14:36:39 +02:00
Daniele Alessandri
5842c57b28
Merge branch 'hashring_rework' into hyves_contribs_port
2010-04-14 14:36:10 +02:00
Daniele Alessandri
c89e222fd2
Removed the setOption and getOption methods from ResponseReader as their implementation was clumsy.
2010-04-10 19:10:20 +02:00
Daniele Alessandri
c8509dd068
Exposed ResponseReader::setHandler as a public method and implemented ResponseReader::getHandler.
2010-04-10 18:48:42 +02:00
Daniele Alessandri
9e97c15a50
\Predis\Client now uses the new \Predis\ClientOptions class to define various options for a client instance.
2010-04-10 17:45:40 +02:00
Daniele Alessandri
c4341eafaa
Implemented the new \Predis\ClientOptions class.
2010-04-10 16:53:19 +02:00
Daniele Alessandri
a2617af24a
Removed a spurious space character.
2010-04-10 16:45:58 +02:00
Daniele Alessandri
ea04aa67c6
Bugfix: missing backslash for root namespace.
2010-04-10 16:44:50 +02:00
Daniele Alessandri
994258b4c2
Slightly changed the arguments order of HashRing::addNodeToRing.
2010-04-10 11:01:03 +02:00
Daniele Alessandri
2272982364
Updated CHANGELOG.
2010-04-10 10:55:43 +02:00
Daniele Alessandri
3a44f766c2
Close the underlying connection also on MalformedServerResponse exceptions.
2010-04-10 10:15:05 +02:00
Daniele Alessandri
bac4be648f
Added support for persistent connections (optional and experimental).
2010-04-10 10:13:01 +02:00
Daniele Alessandri
a1c827cb2d
Precalculate the total count of the keys in the ring.
2010-04-10 09:25:58 +02:00
Daniele Alessandri
1ba033879a
Bugfix: wrap-around differences for HashRing and KetamaPureRing.
2010-04-10 09:05:49 +02:00
Daniele Alessandri
79e7b0b209
Predis\ConnectionCluster now accepts an instance of Predis\Utilities\IRing as an optional parameter.
2010-04-04 23:32:21 +02:00
Daniele Alessandri
6d5060b226
Introduced the new KetamaPureRing class with the same key distribution algorithm of libketama.
2010-04-04 23:14:57 +02:00
Daniele Alessandri
a6c246ac7c
Small refactoring of the HashRing class.
2010-04-04 23:13:22 +02:00
Daniele Alessandri
18e181d9a1
Introduced the new IRing interface.
2010-04-04 20:13:07 +02:00
Daniele Alessandri
aafddece15
Removed code duplication.
2010-04-03 14:01:53 +02:00
Daniele Alessandri
45ed2a9f96
Changed the parameters order for the constructor of the \Predis\CommunicationException class.
2010-04-03 13:31:49 +02:00
Daniele Alessandri
958c0a3b33
Disallow length parameter <= 0 for Connection::readBytes.
2010-04-03 13:23:42 +02:00
Daniele Alessandri
f7f9e3483c
Reworked the CommunicationException class and its derivates; When specified, close the underlying connection after a CommunicationException has been trown.
2010-04-02 18:53:42 +02:00
Daniele Alessandri
5040ce7d18
New exceptions hierarchy.
2010-04-02 16:58:19 +02:00
Daniele Alessandri
41f2065287
Removed a couple of redundant destructors.
2010-04-02 14:57:14 +02:00
Daniele Alessandri
617d5f69b6
Added support for async connections.
2010-04-02 14:28:15 +02:00
Daniele Alessandri
c87fc91fb4
Bugfix: close the connection on Connection::rawCommand when the parameter is set to TRUE.
2010-04-02 14:15:10 +02:00
Daniele Alessandri
4cc43775b0
Added support for partial reads/writes. Note that stream_get_contents is not used because it doesn't seem to respect the timeout.
2010-04-02 13:51:46 +02:00
Daniele Alessandri
1b5e148d96
\Predis\Client::setProfile now accepts also a string value to specify the target server profile.
2010-03-31 12:23:10 +02:00
Daniele Alessandri
981b64fe21
Added support for weight parameter in server configuration, that allows to balance the keys asymmetrically across multiple servers.
2010-03-31 12:04:11 +02:00
Daniele Alessandri
6ea96dcfea
Added support for optionally weighted nodes in the hashring.
2010-03-31 11:47:33 +02:00
Daniele Alessandri
435fdeab75
Add support for microsecond read/write timeouts.
2010-03-31 10:40:14 +02:00
Daniele Alessandri
4f3ffe1217
Made ConnectionCluster::getConnection public, so client code can check to which server a command would be sent.
2010-03-30 15:47:39 +02:00
Daniele Alessandri
486244be8d
Reworked HashRing::remove to handle hash collisions in a consistent way.
2010-03-30 15:41:31 +02:00
Daniele Alessandri
2cd056cab6
Added wrapping around for the consistent hashing algorithm.
2010-03-30 15:03:49 +02:00
Daniele Alessandri
1c286f29d1
executeCommand is now part of the IConnection interface; Moved the actual implementation of executeCommand() from Predis\Client to Predis\Connection.
2010-03-30 12:53:11 +02:00
Daniele Alessandri
631832eaf9
Updated CHANGELOG.
2010-03-29 12:48:54 +02:00
Daniele Alessandri
17dff871bc
New command: HINCRBY (Redis v2.0-dev).
2010-03-29 12:46:43 +02:00
Daniele Alessandri
f3d7e5d31b
New command: HEXISTS (Redis v2.0-dev).
2010-03-29 12:46:37 +02:00
Daniele Alessandri
2d8007448f
New command: CONFIG (Redis v2.0-dev).
2010-03-29 12:46:30 +02:00
Daniele Alessandri
de1b8f45bc
Fixed failing tests due to changes introduced in Redis commits 3ea27d3, cc3b01c and 653c924.
2010-03-29 12:46:23 +02:00
Daniele Alessandri
a0350b2726
Updated CHANGELOG.
2010-03-17 08:20:13 +01:00
Daniele Alessandri
70907adcce
Wrong parameters passed to ClientException on write errors over the network.
2010-03-16 22:53:50 +01:00
Daniele Alessandri
8391326de6
New command: HLEN (Redis v2.0-dev).
2010-03-16 17:40:24 +01:00
Daniele Alessandri
9e417d9bcf
New command: HGETALL (Redis v2.0-dev).
2010-03-16 17:24:58 +01:00
Daniele Alessandri
13ae4c4ca0
New command: HVALS (Redis v2.0-dev).
2010-03-16 17:22:46 +01:00
Daniele Alessandri
cd8674c2f7
New command: HKEYS (Redis v2.0-dev).
2010-03-16 17:21:55 +01:00
Daniele Alessandri
5787b4b9fd
New command: HDEL (Redis v2.0-dev).
2010-03-16 17:20:25 +01:00
Daniele Alessandri
0fed80279a
Renamed \Predis\Commands\HSet and \Predis\Commands\HGet to \Predis\Commands\HashSet and \Predis\Commands\HashGet for naming consistency.
2010-03-16 17:18:25 +01:00
Daniele Alessandri
1fe49863b4
Do not parse ResponseError instances.
2010-03-11 19:08:47 +01:00
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
ff103b385d
Tests for Predis\CommandPipeline.
2010-03-10 18:46:45 +01:00
Daniele Alessandri
4dc9affda2
Minor adjustments in a few tests.
2010-03-10 17:48:28 +01:00
Daniele Alessandri
e9e2b8ca5a
Tests for Predis\ResponseReader.
2010-03-10 17:46:35 +01:00
Daniele Alessandri
1394df5625
Tests for Predis\Connection.
2010-03-10 16:24:09 +01:00
Daniele Alessandri
5b039c8ee8
Tests for Predis\Command.
2010-03-10 14:59:34 +01:00
Daniele Alessandri
90078b95c7
Tests for Predis\ResponseError.
2010-03-10 14:18:28 +01:00
Daniele Alessandri
83ab54e9fc
Tests for Predis\ResponseQueued.
2010-03-10 14:18:15 +01:00
Daniele Alessandri
ea9f83d4c0
Tests for Predis\RedisServerProfile.
2010-03-10 14:04:43 +01:00
Daniele Alessandri
95664719a6
Tests for Predis\ConnectionParameters.
2010-03-10 12:04:17 +01:00
Daniele Alessandri
f02b5494c7
New set of tests for client-specific features.
2010-03-10 11:47:41 +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
83c071b7ff
Updated CHANGELOG.
2010-03-09 16:47:42 +01:00
Daniele Alessandri
cadb7f8a3f
Updated TODO.
2010-03-09 16:47:21 +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
4e4c26c4e6
Updated CHANGELOG.
2010-03-09 16:17:32 +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
5cae45282d
Fixed tests against the current Redis master branch.
2010-03-09 12:54:18 +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
c06f9e34bf
Added tests for DISCARD.
2010-03-04 14:18:38 +01:00
Daniele Alessandri
ac8172235f
Added tests for ZRANK.
2010-03-04 14:09:56 +01:00
Daniele Alessandri
5aaec9d11b
Added a test for SUBSTR on integer-encoded values.
2010-03-04 13:58:05 +01:00
Daniele Alessandri
3e0d9c8400
Added tests for SUBSTR.
2010-03-04 12:41:51 +01:00
Daniele Alessandri
9ac0d26a48
Minor code rearrangements.
2010-03-04 12:29:23 +01:00
Daniele Alessandri
4645e7508e
Updated CHANGELOG.
2010-03-04 12:21:06 +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
138a171f6c
Updated CHANGELOG.
2010-03-02 17:21:38 +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
c8554f2c8b
Added tests for APPEND.
2010-02-27 11:15:31 +01:00
Daniele Alessandri
4c6dedabe0
Added tests for ZCOUNT.
2010-02-27 11:08:05 +01:00
Daniele Alessandri
5ad2abd149
Added test for ZRANGEBYSCORE with the WITHSCORES parameter.
2010-02-27 10:59:34 +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
90dc794780
Updated CHANGELOG.
2010-02-27 09:49:04 +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
7579b2c6b7
Updated CHANGELOG.
2010-02-26 22:53:25 +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
2b0bd88d8f
Updated CHANGELOG
2010-02-25 11:39:52 +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
40df90007d
Miss typings, oh my...
2010-02-25 11:27:07 +01:00
Daniele Alessandri
2c7a99df55
Added missing test for SORT ... GET
2010-02-25 11:24:50 +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
Daniele Alessandri
f5f06d643f
Fixed a dangerous oversight in the test suite (seriously, testing FLUSHALL was indeed stupid).
2010-01-27 23:56:26 +01:00
Daniele Alessandri
1be9bef159
Updated CHANGELOG
2010-01-23 16:01:03 +01:00
Daniele Alessandri
7fa935f827
Implemented a factory method for creating server profiles instances.
2010-01-23 15:55:34 +01:00
Daniele Alessandri
afdc79f97f
Added tests for BGREWRITEAOF.
2010-01-23 15:31:53 +01:00
Daniele Alessandri
6cb9663539
Added missing support for BGREWRITEAOF for Redis >= 1.2.0
2010-01-23 12:54:58 +01:00
Daniele Alessandri
8622dd8b05
Added the CHANGELOG file.
2010-01-23 12:41:45 +01:00
Daniele Alessandri
21acb300a7
The command ListPopLastPushHead (RPOPLPUSH) is now defined as an inline command instead of bulk after a change in Redis 1.2.1. The old bulk RPOPLPUSH has been preserved and renamed in ListPopLastPushHeadBulk, so that you can override the current server profile if you need the old (and uncorrect) behaviour when connecting to a Redis 1.2.0 instance.
2010-01-23 12:33:10 +01:00
Daniele Alessandri
35016ba4b0
Changed the naming convention of the predefined RedisServerProfile derived classes.
2010-01-09 12:36:46 +01:00
Daniele Alessandri
ab2842c100
Minor changes in code formatting.
2010-01-09 12:14:40 +01:00
Daniele Alessandri
91543d776f
Adjusted Predis\Commands\BackgroundSave according to the new behavior of BGSAVE in Redis 1.2.
2010-01-09 12:00:36 +01:00
Daniele Alessandri
84fb4390f9
Using isset to check if prefix handlers have been initialized is faster.
2010-01-09 11:42:16 +01:00
Daniele Alessandri
8b152f0ea3
Added checks for errors returned by read and write operations on sockets.
2010-01-09 11:28:57 +01:00
Daniele Alessandri
e01feda91f
Updated the README.
2010-01-09 10:01:47 +01:00
Daniele Alessandri
15c81fca6f
Bumping year in the LICENSE file.
2010-01-09 09:49:20 +01:00
Daniele Alessandri
75fad0a027
Implemented Response::read. This new method groups Response::getPrefix and Response::getHeader (and reduces the overhead of unnecessary method calls).
2010-01-07 13:48:14 +01:00
Daniele Alessandri
46dd3d6f19
Improved the internals of MultiExecBlock::execute (slight reduction in memory usage; check for out-of-sync conditions between the client and the server)
2010-01-06 12:13:51 +01:00
Daniele Alessandri
d51e8e0c25
Greatly improved the code that initially handles replies getting the correct reply handler. Also, performances might have improved a bit.
2010-01-06 11:47:05 +01:00
Daniele Alessandri
1d3e8cea59
Reduced memory consumption for pipelines
2010-01-06 11:03:27 +01:00
Daniele Alessandri
03886d9a78
Merge branch 'blpop'
...
Conflicts:
lib/Predis.php
2010-01-06 10:37:03 +01:00
Daniele Alessandri
2577f6a2cb
Added tests for BLPOP and BRPOP. They are not really that great as they are missing a concurrent RPUSHing client, but they are enough for now.
2010-01-02 22:09:27 +01:00
Daniele Alessandri
5641983059
Fixed E_NOTICE messages in Predis\Response::getPrefixHandler on undefined handlers (unknown prefixes received from the server).
2010-01-01 20:44:28 +01:00
Daniele Alessandri
0bac9308b5
Fixed E_NOTICE messages in Predis\RedisServerProfile::createCommand on undefined commands.
2010-01-01 20:32:24 +01:00
Daniele Alessandri
d12694c271
Predis\CommandPipeline::execute and Predis\MultiExecBlock::execute are no more limited to accepting only instances of Closure, now every kind of callable object can be passed as argument.
2010-01-01 20:19:34 +01:00
Daniele Alessandri
362cdf4d5a
Use the new ternary short cut "?:" where it helps with readability.
2010-01-01 18:55:32 +01:00
Daniele Alessandri
04c481b3d7
Removed a bunch of unmeaningful TODOs end notes.
2010-01-01 18:42:13 +01:00
Daniele Alessandri
238baf7dc8
Implemented Predis\RedisServerProfile::compareWith, usefult to compare two different profiles. Its current behavior is the very same as PHP's version_compare.
2010-01-01 18:35:15 +01:00
Daniele Alessandri
9dae351819
Casting a instance of Predis\RedisServerProfile to string returns its associated version string.
2010-01-01 18:11:37 +01:00
Daniele Alessandri
d34fc18ea8
Reverted a bad versioning idea. The Predis\RedisServer__Futures class will always be availabe and it represents the current development branch of Redis.
2010-01-01 18:09:03 +01:00
Daniele Alessandri
cd8604b489
Removed Predis\Client::registerCommand and Predis\Client::registerCommands as they are rarely used. The methods of the same name available in RedisServerProfile (and its derivates) serve the same purpose, use them from now on.
2010-01-01 17:46:34 +01:00
Daniele Alessandri
99ad5aa4a5
Implemented Predis\Client::getProfile.
2010-01-01 17:37:26 +01:00
Daniele Alessandri
2e5549b316
Renamed Predis\Client::setServerProfile to Predis\Client::setProfile.
2010-01-01 17:35:42 +01:00
Daniele Alessandri
d719a26406
Switch to string-based versions for RedisServerProfile classes.
2010-01-01 17:25:27 +01:00
Daniele Alessandri
2a06d84a7b
Throw a more meaningful exception if the server does not respond with a +QUEUED status reply to commands issued in a MULTI / EXEC context.
2009-12-31 14:11:24 +01:00
Daniele Alessandri
1f9e6143bf
Commands issued with a MultiExecBlock now return ResponseQueued instances to the caller.
2009-12-31 14:05:12 +01:00
Daniele Alessandri
77f885c233
Merge branch 'multi_exec'
2009-12-31 13:48:20 +01:00
Daniele Alessandri
db6e40df98
Added tests for MULTI / EXEC.
2009-12-31 13:00:27 +01:00
Daniele Alessandri
e637881c2d
Force the test suite to load the server profile for Redis edge versions (development unstable).
2009-12-31 12:18:34 +01:00
Daniele Alessandri
31234d694e
Bugfix: ListPopFirstBlocking is actually BLPOP, not BRPOP. This is what happens when you write code while thinking about something else...
2009-12-30 21:57:51 +01:00
Daniele Alessandri
a4e067891a
Implemented RedisServerProfile::supportsCommand.
2009-12-30 13:49:48 +01:00
Daniele Alessandri
bf19df180c
Introduced a first draft of a new way to internally check for responses to enqueued commands.
2009-12-30 11:51:39 +01:00
Daniele Alessandri
7c6e03edae
Removed the default value for the read_write_timeout when initializing the connection stream. Now the timeout for r/w operations on the stream is set only if it has been set in the ConnectionParameters instance, otherwise the system default will be implicitly used (the default is usually 60 seconds).
2009-12-30 10:38:56 +01:00
Daniele Alessandri
ee739ff843
Implemented the __isset magic method for the ConnectionParameters class (it is useful to check if a parameter has been set).
2009-12-30 10:30:08 +01:00
Daniele Alessandri
fcecd2579a
Added "connection_timeout" and "read_write_timeout" as optional arguments for the ConnectionParameters class.
2009-12-30 10:25:06 +01:00
Daniele Alessandri
f3aeecef37
Added BLPOP and BRPOP.
2009-12-30 09:35:46 +01:00
Daniele Alessandri
55c40afcd8
Bugfix: return an empty string instead of null when the data length of a bulk reply is 0.
2009-12-29 14:55:26 +01:00
Daniele Alessandri
1626f9658c
New Predis\Client::multiExec method added.
2009-12-28 00:29:51 +01:00
Daniele Alessandri
f4b0f664e7
Implemented the new Predis\MultiExecBlock class to wrap commands issued inside of MULTI + EXEC.
2009-12-28 00:23:00 +01:00
Daniele Alessandri
5c95b9cdcc
Do not parse the response to a command if we get a QUEUED status reply from the server.
2009-12-27 23:21:46 +01:00
Daniele Alessandri
a13d0e4d72
Started hacking a bit on the new MULTI and EXEC commands.
2009-12-27 22:44:47 +01:00
Daniele Alessandri
abbc9108e0
Fixed another E_STRICT notice that was being raised when using a pipeline.
2009-12-27 11:42:18 +01:00
Daniele Alessandri
b757afe492
Removed a superfluous method call.
2009-12-27 10:57:23 +01:00
Daniele Alessandri
75a06019f8
Fixed E_STRICT notices that were being raised by PHP due to a slightly different method signature used for two command classes.
2009-12-27 10:53:29 +01:00
Daniele Alessandri
51710682c7
ZSetReverseRange now inherits from ZSetRange as the two commands share the same behaviour. This change allowed us to remove some code duplication.
2009-12-27 10:48:41 +01:00
Daniele Alessandri
f82d11a8db
Changed the name of Predis\Client::createCommandInstance into Predis\Client::createCommand.
2009-12-27 10:33:02 +01:00
Daniele Alessandri
6814845e3f
Removed a wrong type-check in Predis\Client::setupConnection that was breaking the initialization of a cluster of connections when using an array of URI strings as parameters.
2009-12-26 19:42:45 +01:00
Daniele Alessandri
e8a0f3f627
Fix for a warning emitted by PHP when passing an array of strings parameters to Predis\Client::create.
2009-12-26 19:39:18 +01:00
Daniele Alessandri
6e39491692
Changed the returned string used to hash a Connection instance when using a cluster of connections. IMPORTANT NOTE: if you are using a version of Predis older than this commit, then this change will surely have an impact on your existing partitioned data as it changes the distribution of server nodes over the ring.
2009-12-25 22:04:24 +01:00
Daniele Alessandri
e5c3123d88
Updated TODO.
2009-12-25 21:54:04 +01:00
Daniele Alessandri
6d43827af9
Merge branch 'server_compat'
...
Conflicts:
lib/Predis.php
2009-12-25 21:25:40 +01:00
Daniele Alessandri
4a4e4b5a72
Updated the README with the new parameters for Predis\Client. The old signature Predis\Client(, ) is now completely deprecated and it does not work anymore.
2009-12-25 21:12:54 +01:00
Daniele Alessandri
8eb51ec0d1
Updated the test suite to work with the new parameters for Predis\Client.
2009-12-25 21:11:08 +01:00
Daniele Alessandri
47bb83bbb2
Type checking + minor fixes + more readable code for Predis\Client::__construct and Predis\Client::create.
2009-12-25 20:51:17 +01:00
Daniele Alessandri
e64333d77b
Complete rewrite of the client construction and initialization bits.
2009-12-25 19:54:12 +01:00
Daniele Alessandri
627433cef8
Extended the tests for ZRANGE and ZREVRANGE to cover the newly added "WITHSCORES" option.
2009-12-23 22:05:04 +01:00
Daniele Alessandri
822a3e56e2
Implemented the "WITHSCORES" option for ZRANGE and ZREVRANGE.
2009-12-23 21:54:53 +01:00
Daniele Alessandri
d9b304f9e3
Merge branch 'cmd_zincrby'
2009-12-19 10:49:34 +01:00
Daniele Alessandri
81484b3351
Added tests for Predis\Commands\ZSetIncrementBy (ZINCRBY).
2009-12-19 10:46:09 +01:00
Daniele Alessandri
d3a62d68bb
Fixed the return value of Predis\Commands\ZSetIncrementBy as it does not return a boolean value but the current score after the increment operation.
2009-12-19 10:45:19 +01:00
Daniele Alessandri
20e416306c
Added support for key tags: instead of hashing the full key, we hash only the portion enclosed within curly brackets.
2009-12-18 22:57:16 +01:00
Daniele Alessandri
3ccbff4277
The second parameter for RedisServerProfile::createCommandInstance is now optional.
2009-12-18 22:02:30 +01:00
Daniele Alessandri
6e76fbf660
Moved the default server profile class name to a private static variable of the Client class.
2009-12-18 21:59:00 +01:00
Daniele Alessandri
88cda9e52c
Added the new public method Client::setServerProfile.
2009-12-18 21:29:44 +01:00
Daniele Alessandri
876ac2ec7c
Renamed class RedisServerCompatibility to RedisServerProfile.
2009-12-18 21:24:19 +01:00
Daniele Alessandri
e57348720f
Just removed a bunch of unuseful comments...
2009-12-18 21:16:24 +01:00
Daniele Alessandri
f811877c87
More trivial changes for HashRing::add and HashRing::remove.
2009-12-18 21:08:42 +01:00
Daniele Alessandri
d3115e6259
Trivial changes in HashRing::getNodeKey.
2009-12-18 21:04:44 +01:00
Daniele Alessandri
ca7f3e294c
Removed the rather superfluous private method ConnectionCluster::getConnectionFromRing.
2009-12-18 20:48:04 +01:00
Daniele Alessandri
bcfa64f431
Moved the hash calculation for a command from ConnectionCluster to the command instance itself.
2009-12-18 20:43:35 +01:00
Daniele Alessandri
3428529be6
Client::executeCommandInternal must accept IConnection types! Stupid bugs are indeed stupid.
2009-12-16 00:23:55 +01:00
Daniele Alessandri
b1edc31af3
When using a ConnectionCluster (sharding data over multiple servers), disallow sending commands that cannot be hashed by a key argument.
2009-12-14 18:15:10 +01:00
Daniele Alessandri
344ec44059
Refactored Client::executeCommand and introduced the new method Client::executeCommandOnShards which is useful to execute commands on all the connections registered in a ConnectionCluster instance.
2009-12-14 18:02:54 +01:00
Daniele Alessandri
8d4958a516
The second parameter for Client::createCommandInstance is now optional.
2009-12-14 17:57:17 +01:00
Daniele Alessandri
b777daa535
Slightly improved the internals of Command::getArgument and Command::getArguments.
2009-12-14 17:54:11 +01:00
Daniele Alessandri
177120e1a2
The private method computeHash of ConnectionCluster is now a static method.
2009-12-14 17:47:10 +01:00
Daniele Alessandri
a84c9bdac7
ConnectionCluster now implements the IteratorAggregate interface, thus enabling iterations over the registered connections simply by using a foreach loop.
2009-12-14 17:43:30 +01:00
Daniele Alessandri
c7cd2b67e0
Same fix as commit 755c252 in master for the short alias of \Predis\Commands\Decrement
2009-12-04 21:09:38 +01:00
Daniele Alessandri
cfcb635c24
Predis\Client now uses the new compatibility profiles, though it is still hardcoded which profile to load.
2009-11-29 13:38:04 +01:00
Daniele Alessandri
d0d51257c9
Added compatibility profiles for Redis server versions 1.0 and the upcoming 1.2.
2009-11-29 13:16:42 +01:00
Daniele Alessandri
a70c5b0800
Added the new abstract class 'RedisServerCompatibility'. Its subclassess will be used to define a set compatibility profiles for each version of the Redis server. The only drawback is that the selected compatibility profile will be shared among multiple connections when using client-side sharding.
2009-11-29 13:09:08 +01:00
Daniele Alessandri
af810d9613
Implemented ZINCRBY (Class: \Predis\Commands\ZSetIncrementBy)
2009-11-20 22:23:42 +01:00