Hello, I am trying to use the db.remove({} , {multi: true}) to remove all items in database, but it seems it only remove one item at a time:
and also I tried to console .log the numRemoved, but never see the log on the console
await messageDB.remove({}, {multi: true}, function(err, numRemoved) { console.log("number removed", numRemoved); });
could you please help me to see if the {multi: true} and callback function is working ok ?
Hello, I am trying to use the
db.remove({} , {multi: true})
to remove all items in database, but it seems it only remove one item at a time:and also I tried to console .log the numRemoved, but never see the log on the console
await messageDB.remove({}, {multi: true}, function(err, numRemoved) { console.log("number removed", numRemoved); });
could you please help me to see if the {multi: true} and callback function is working ok ?
Thanks