getSortedSetRevRangeWithScores

v1.18.x
barisusakli 11 years ago
parent b5df5c0a91
commit 9d7a8fcc0b

@ -64,7 +64,13 @@ module.exports = function(db, module) {
};
module.getSortedSetRevRangeWithScores = function(key, start, stop, callback) {
// should return [{value:"test", score: 2}, {value: "foo", score: 1}, ...]
module.getListRange(key, start, stop, function(err, set) {
if (err) {
return callback(err);
}
set.sort(function(a, b) {return b.score - a.score;});
callback(null, set);
})
};
module.getSortedSetRangeByScore = function(key, start, count, min, max, callback) {

Loading…
Cancel
Save