240 Commits

Author SHA1 Message Date
michael-grunder
75ddd072a4 Add unit tests for -inf/inf/+inf WEIGHTS
Addresses issue #336
2013-05-09 11:55:43 -07:00
michael-grunder
e914485313 Merge branch 'hotfix/inspection_methods' into develop
Conflicts:
	php_redis.h
	redis.c
2013-03-27 11:21:02 -07:00
michael-grunder
ef792320e7 Introspection methods
This commit adds methods to get information about the state
of our phpredis object, such as what host/port we are connected
to, our timeout, etc...

The following methods have been added:

getHost()
getPort()
getDBNum()
getTimeout()
getReadTimeout()
isConnected()
getPersistentID()
getAuth()

In addition, there is a small memory leak fix when a persistent id
was specifically passed to connect() (it wasn't beeing freed).

Addresses issue #320
2013-03-27 10:21:18 -07:00
Nicolas Favre-Felix
a4784b4de7 Merge branch 'hotfix/issue-229' into develop 2013-02-17 16:32:08 +00:00
Nicolas Favre-Felix
5953e8fe13 Merge branch 'rnamiki-master' into hotfix/issue-229 2013-02-17 16:26:18 +00:00
Nicolas Favre-Felix
fb7c7a8d2e Merge branch 'hotfix/fix-broken-delete-test' into develop 2013-02-17 16:21:20 +00:00
Nicolas Favre-Felix
8b4ee3dda2 Fix broken test with unexpected result for delete 2013-02-17 16:20:44 +00:00
Nicolas Favre-Felix
48b3e6b8c5 Merge branch 'hotfix/ttl-response-type' into develop 2013-02-17 16:18:02 +00:00
Nicolas Favre-Felix
90bdf9e8fd Fix test for TTL return value
Resolves issue #302
2013-02-17 16:17:25 +00:00
Nicolas Favre-Felix
4231d70b66 Merge branch 'master' of https://github.com/rnamiki/phpredis into rnamiki-master 2013-02-17 16:07:39 +00:00
michael-grunder
9a5196ed2e CLIENT Commands
This commit adds support for the CLIENT commands (list, getname,
setname, kill).

You can call them like so:

$redis->client('list');
$redis->client('getname');
$redis->client('setname', $name);
$redis->client('kill', $ip_port);

Solves issue #300
2013-02-16 17:57:32 -08:00
michael-grunder
55dd05356d Merge remote-tracking branch 'kotas/opt-read-timeout'
Conflicts:
	library.c
2013-02-11 12:42:49 -08:00
michael-grunder
242a16d50a Merge branch 'srandmember_count'
Conflicts:
	tests/TestRedis.php
2013-02-04 13:22:29 -08:00
michael-grunder
e1a5145ad2 Changed the way we build the HMSET command such that we don't
continue to destroy and reallocate the command buffer

Added a simply library routine to append to a command buffer
using a smart_str

Made the unit tests work even if you're not compiled with
igbinary

Addresses issue #287
2013-01-18 18:05:02 -08:00
Pepijn Verlaan
93dae810ce Added failing test for brpoplpush command 2012-11-16 09:52:37 +01:00
michael-grunder
51b96938bc SRANDMEMBER optional COUNT argument
Adds support for the new COUNT argument to SRANDMEMBER.  If called
without a count, we will still return a string response (with one
randome member from the set, or false on a failure/type error).

If the count argument is passed, we return instead an array up to
the number asked for, given how Redis will process this value.

http://redis.io/commands/srandmember
2012-10-25 14:19:04 -07:00
kotas
3764a6cd80 add Redis::OPT_READ_TIMEOUT option for issue #70 2012-10-04 22:18:18 +09:00
Nicolas Favre-Felix
7dfac44c8f Add missing serializer in zInter args
Fixes GitHub issue #252
2012-09-21 18:05:15 +01:00
Nicolas Favre-Felix
5855cfc2ca Add clearLastError 2012-09-09 22:09:27 +01:00
Nicolas Favre-Felix
6153477c4f Extend getLastError to all calls
Fixes GitHub issue #245.
2012-09-09 20:38:30 +01:00
Remi Collet
deca4fa30c add 'markTestSkipped' method to test suite, improves report 2012-09-01 09:49:11 +02:00
Remi Collet
a968d9ea79 SCRIPT / EVAL / TIME are new in 2.6.0 2012-08-31 16:20:42 +02:00
Remi Collet
36f5f76786 INFO COMMANDSTATS is new in 2.6.0 2012-08-31 16:14:35 +02:00
Remi Collet
5ee3c840cb INFO COMMANDSTATS is new in 2.6.0 2012-08-31 16:12:04 +02:00
Remi Collet
e839d248bb INCRBYFLOAT new in 2.6.0 2012-08-31 16:10:07 +02:00
Remi Collet
0ad8482727 manage test suite exit code 2012-08-31 16:05:29 +02:00
Remi Collet
2516eb22bb proposal for multi-version test suite ("All tests passed." with 2.6.0RC6) 2012-08-31 15:25:56 +02:00
Remi Collet
ac09cec134 fix php warning during tests 2012-08-30 09:06:42 +02:00
michael-grunder
8e433c4794 Merge branch 'php-numencode' 2012-08-16 12:40:48 -07:00
rnamiki
a65b609201 fixed bug different type command returns 2012-08-15 18:14:25 +09:00
michael-grunder
691786bc7f Properly apply a prefix on sort(), sortAsc(), and sortDesc() methods with an
included unit test to make sure it's working properly.

This fixes issue #226
2012-08-08 16:09:57 -07:00
michael-grunder
a568029864 Actually remove the test for now 2012-07-06 10:19:49 -07:00
michael-grunder
a7122c3664 Remove test for now 2012-07-06 10:10:18 -07:00
michael-grunder
83f3440b88 PHP 5.4 number encode fix 2012-07-02 12:56:10 -07:00
michael-grunder
f1231c98e2 TIME command 2012-06-05 09:04:10 -07:00
michael-grunder
f295c1c9d6 Allow integer keys for MSET 2012-06-04 23:58:01 -07:00
Nicolas Favre-Felix
2e70c5a5a9 Merge branch 'reconnect-select' of https://github.com/0/phpredis into 0-reconnect-select 2012-05-27 22:24:58 +01:00
Nicolas Favre-Felix
bcabe601b2 Fix EOLs 2012-05-27 22:14:03 +01:00
maxbeutel
0081e4dfce added testcase 2012-05-23 11:27:35 +02:00
michael-grunder
fe02d5d89e Removed unused code and updated unit tests to use === comparison instead of ==. In addition, removed string conversion conditional as per Nicolasff 2012-05-20 16:59:51 -07:00
michael-grunder
6a533797e0 Added PIPELINE/MULTI unit test for EVAL, updated docs with new commands 2012-05-20 16:22:01 -07:00
michael-grunder
e89d38554a Fix segfault in _unserialize when we get badly formed data 2012-05-19 15:08:11 -07:00
michael-grunder
f00ed2aad8 Unit tests for EVAL, EVALSHA, DUMP, RESTORE, _unserialize, and _prefix 2012-05-19 13:47:17 -07:00
Dmitri Iouchtchenko
db3c3c5d2a Added SELECT after reconnect
This prevents the DB number from being reset to zero after a timeout and
subsequent automatic reconnect.
2012-05-08 22:50:36 -04:00
michael-grunder
c9dbfeb29d Added optional string parameter to INFO 2012-05-06 17:55:50 -07:00
michael-grunder
3b87da6343 Remove unused vars, commented code for HINCRBYFLOAT 2012-05-04 18:26:47 -07:00
michael-grunder
24c1023de8 Fix data type for HINCRBYFLOAT unit test 2012-05-04 13:11:41 -07:00
michael-grunder
d59b53b6b5 Implemented INCRBYFLOAT and HINCRBYFLOAT 2012-05-04 12:12:03 -07:00
Nicolas Favre-Felix
00b5784e8c Add test for GitHub issue #118. 2012-04-29 18:48:50 +01:00
Nicolas Favre-Felix
8d67222370 Convert first parameter to ZADD to string.
Fixes GitHub issue #121.
2012-04-29 18:36:01 +01:00