mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 03:51:26 +01:00
Merge remote-tracking branch 'origin/master' into LevelDB
Conflicts: tests/database.js
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -359,12 +359,12 @@
|
||||
redisClient.zrevrange(key, start, stop, callback);
|
||||
};
|
||||
|
||||
module.getSortedSetRangeByScore = function(args, callback) {
|
||||
redisClient.zrangebyscore(args, callback);
|
||||
module.getSortedSetRangeByScore = function(key, start, count, min, max, callback) {
|
||||
redisClient.zrangebyscore([key, min, max, 'LIMIT', start, count], callback);
|
||||
};
|
||||
|
||||
module.getSortedSetRevRangeByScore = function(args, callback) {
|
||||
redisClient.zrevrangebyscore(args, callback);
|
||||
module.getSortedSetRevRangeByScore = function(key, start, count, max, min, callback) {
|
||||
redisClient.zrevrangebyscore([key, max, min, 'LIMIT', start, count], callback);
|
||||
};
|
||||
|
||||
module.sortedSetCount = function(key, min, max, callback) {
|
||||
|
||||
Reference in New Issue
Block a user