added getObjectKeys for julian :)

This commit is contained in:
Baris Soner Usakli
2014-01-23 16:34:54 -05:00
parent 824c5072e8
commit bc1cde38da
2 changed files with 18 additions and 0 deletions

View File

@@ -343,6 +343,20 @@
});
}
module.getObjectKeys = function(key, callback) {
module.getObject(key, function(err, data) {
if(err) {
return callback(err);
}
if(data) {
callback(null, Object.keys(data));
} else {
callback(null, []);
}
});
}
module.getObjectValues = function(key, callback) {
module.getObject(key, function(err, data) {
if(err) {

View File

@@ -275,6 +275,10 @@
});
}
module.getObjectKeys = function(key, callback) {
redisClient.hkeys(key, callback);
}
module.getObjectValues = function(key, callback) {
redisClient.hvals(key, callback);
}