-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add update method,support where query. #9
base: master
Are you sure you want to change the base?
Conversation
updateData=filter.update; | ||
this.all(model, filter, function(err,records){ | ||
if (err) return callback(err); | ||
for (var i=0;i<records.length;i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use forEach
And couple more questions: what if one of updates failed? how to handle error? |
I know the questions.To fix it should use event but it will import mass code. And I found another issue. schema.models.push.create({pushId:"111111111111111111"},function(err,user){
console.log(user);
schema.models.push.all({},function(err,data){
console.log(data);
})
}) The all function will return 111111111111111100 not 111111111111111111. |
How did you checked redis? For me it works as expected: redis 127.0.0.1:6379> hmget a a
On 2 April 2014 08:13, hustfyb [email protected] wrote:
|
I found the reason. In BridgeToRedis.prototype.fromDb function you will convert string type to JSON object. That will change a number string to a real number, than js will lose precision. You should not touch the string type. |
1 similar comment
I found the reason. In BridgeToRedis.prototype.fromDb function you will convert string type to JSON object. That will change a number string to a real number, than js will lose precision. You should not touch the string type. |
Apologize for my pool English. |
My error. I don't know when I delele some code, I didn't notice that, Sorry. |
No description provided.