summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy <andy@whiskeymedia.com>2010-01-18 12:57:04 -0800
committerandy <andy@whiskeymedia.com>2010-01-18 12:57:04 -0800
commita9bff80ec2d04f70c1e2bed50b70b0168ef8f8c8 (patch)
tree0485ff0c120a4e0357c19c8f04e892e8cc8999f1
parent688ecada1e112bfa59bcdf829c5c23cdbf61c08b (diff)
downloadredis-py-a9bff80ec2d04f70c1e2bed50b70b0168ef8f8c8.tar.gz
Added offset/count optional parameters to zrangebyscore. Thanks Adam Charnock!
-rwxr-xr-xredis.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/redis.py b/redis.py
index 27d0f39..b191f85 100755
--- a/redis.py
+++ b/redis.py
@@ -1079,6 +1079,12 @@ class Redis(object):
1
>>> r.zrangebyscore('z1', 5, 7)
[u'a', u'c']
+ >>> r.zadd('z1', 'e', 8)
+ 1
+ >>> r.zrangebyscore('z1', 5, 8, offset=0, count=2)
+ [u'a', u'c']
+ >>> r.zrangebyscore('z1', 5, 8, offset=1, count=2)
+ [u'c', u'e']
"""
if offset is not None and count is not None:
limit = " LIMIT %d %d" % (offset, count)