added 2 new methods to dbal

getSortedSetRangeWithScores
getSortedSetRangeByScoreWithScores
This commit is contained in:
barisusakli
2014-10-31 17:19:50 -04:00
parent c44068db52
commit 1fe82ee452
2 changed files with 28 additions and 4 deletions

View File

@@ -134,6 +134,10 @@ module.exports = function(db, module) {
getSortedSetRange(key, start, stop, -1, false, callback);
};
module.getSortedSetRangeWithScores = function(key, start, stop, callback) {
getSortedSetRange(key, start, stop, 1, true, callback);
};
module.getSortedSetRevRangeWithScores = function(key, start, stop, callback) {
getSortedSetRange(key, start, stop, -1, true, callback);
};
@@ -146,6 +150,10 @@ module.exports = function(db, module) {
getSortedSetRangeByScore(key, start, count, min, max, -1, false, callback);
};
module.getSortedSetRangeByScoreWithScores = function(key, start, count, min, max, callback) {
getSortedSetRangeByScore(key, start, count, min, max, -1, true, callback);
};
module.getSortedSetRevRangeByScoreWithScores = function(key, start, count, max, min, callback) {
getSortedSetRangeByScore(key, start, count, min, max, -1, true, callback);
};