changed sortedSetRangeByScore

This commit is contained in:
barisusakli
2014-04-10 20:59:17 -04:00
parent 74ff579412
commit 9d405812cb
6 changed files with 13 additions and 18 deletions

View File

@@ -538,21 +538,15 @@
getSortedSetRange(key, start, stop, -1, callback);
};
module.getSortedSetRangeByScore = function(args, callback) {
getSortedSetRangeByScore(args, 1, callback);
module.getSortedSetRangeByScore = function(key, start, count, min, max, callback) {
getSortedSetRangeByScore(key, start, count, min, max, 1, callback);
};
module.getSortedSetRevRangeByScore = function(args, callback) {
getSortedSetRangeByScore(args, -1, callback);
module.getSortedSetRevRangeByScore = function(key, start, count, max, min, callback) {
getSortedSetRangeByScore(key, start, count, min, max, -1, callback);
};
function getSortedSetRangeByScore(args, sort, callback) {
var key = args[0],
max = (args[1] === '+inf') ? Number.MAX_VALUE : args[1],
min = args[2],
start = args[4],
count = args[5];
function getSortedSetRangeByScore(key, start, count, min, max, sort, callback) {
if(parseInt(count, 10) === -1) {
count = 0;
}