mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-01 04:09:51 +01:00
upgrade tags to sorted set
This commit is contained in:
@@ -5,7 +5,7 @@ var async = require('async');
|
||||
|
||||
module.exports = function(db, module) {
|
||||
var helpers = module.helpers.level;
|
||||
|
||||
|
||||
module.sortedSetAdd = function(key, score, value, callback) {
|
||||
module.getListRange(key, 0, -1, function(err, set) {
|
||||
set = set.filter(function(a) {return a.value !== value.toString();});
|
||||
@@ -57,6 +57,10 @@ module.exports = function(db, module) {
|
||||
});
|
||||
};
|
||||
|
||||
module.getSortedSetRevRangeWithScores = function(key, start, stop, callback) {
|
||||
// should return [{value:"test", score: 2}, {value: "foo", score: 1}, ...]
|
||||
};
|
||||
|
||||
module.getSortedSetRangeByScore = function(key, start, count, min, max, callback) {
|
||||
module.getListRange(key, 0, -1, function(err, list) {
|
||||
if (min && max) {
|
||||
|
||||
Reference in New Issue
Block a user