mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
added 2 new methods to dbal
getSortedSetRangeWithScores getSortedSetRangeByScoreWithScores
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user