From 581a954aeb3e298a1ecda1a6bb01e6415a20f28e Mon Sep 17 00:00:00 2001 From: hustfyb Date: Thu, 27 Mar 2014 17:47:28 +0800 Subject: [PATCH] Add update method,support where query. --- lib/redis.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/redis.js b/lib/redis.js index 762defb..70e382d 100644 --- a/lib/redis.js +++ b/lib/redis.js @@ -601,3 +601,18 @@ BridgeToRedis.prototype.transaction = function () { throw new Error('not implemented'); }; +BridgeToRedis.prototype.update = function update(model, filter,callback) { + var me=this; + updateData=filter.update; + this.all(model, filter, function(err,records){ + if (err) return callback(err); + for (var i=0;i