organizing redis driver

This commit is contained in:
psychobunny
2014-04-11 15:29:01 -04:00
parent e442fed40a
commit 9ad7ce9ca8
6 changed files with 362 additions and 353 deletions

View File

@@ -0,0 +1,23 @@
"use strict";
module.exports = function(redisClient, module) {
module.listPrepend = function(key, value, callback) {
redisClient.lpush(key, value, callback);
};
module.listAppend = function(key, value, callback) {
redisClient.rpush(key, value, callback);
};
module.listRemoveLast = function(key, callback) {
redisClient.rpop(key, callback);
};
module.listRemoveAll = function(key, value, callback) {
redisClient.lrem(key, 0, value, callback);
};
module.getListRange = function(key, start, stop, callback) {
redisClient.lrange(key, start, stop, callback);
};
};