remove filter does not match
celevra opened this issue · 3 comments
celevra commented
Hi,
my remove filter seems like to not match, this is in my database:
cat positions.nosql
{"time":"2017-03-04T12:46:26.000Z","lat":49.563133333,"lon":10.918623333,"speed":0}
this is my code:
console.log('removing', position)
nosql.remove().make(function(builder) {
builder.where('time', position.time);
builder.callback(function(err, count) {
if(err) console.log(err)
else console.log('removed documents:', count);
});
});
this is the output:
removing { time: 2017-03-04T12:46:26.000Z,
lat: 49.563133333,
lon: 10.918623333,
speed: 0,
cache: true }
removed documents: 0
no changes in the database
am i doing something wrong?
regards
celevra
petersirka commented
Hi @celevra,
yes, there was a bug (thank you for your report). I have fixed it. Please download latest beta version $ npm install total.js@beta
.
Thank you!
petersirka commented
Sorry :-D I have fixed it in Total.js framework and now I have published a new version of NoSQL into the NPM with this fix $ npm install nosql
.
celevra commented
thank you for your fast answer! works perfect, thanks for your work!