From 28c75e09a98c888880660babf40de0d16a504c91 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Tue, 3 Dec 2013 22:16:44 -0500 Subject: [PATCH] can haz sorted sets? --- src/database/mongo.js | 79 ++++++++++++++++++++++++++++++++++++------- src/database/redis.js | 4 +-- src/routes/debug.js | 36 ++++++++++++++++++-- 3 files changed, 101 insertions(+), 18 deletions(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index fe81e0fd07..752f291249 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -26,15 +26,13 @@ }); - db.createCollection('objects', function(err, collection) { - }); + db.createCollection('objects', function(err, _collection) { - db.createCollection('sets', function(err, collection) { }); - callback(err); }); + // look up how its done in mongo /*if (nconf.get('mongo:password')) { redisClient.auth(nconf.get('mongo:password')); @@ -68,7 +66,7 @@ throw new Error('not-implemented'); } - module.set = function(key, callback) { + module.set = function(key, value, callback) { throw new Error('not-implemented'); } @@ -124,15 +122,20 @@ return callback(err); } - var data = {}; if(item === null) { + item = {}; + for(var i=0; i