antoniopresto / react-native-local-mongodb

react-native local mongodb storage.
MIT License
304 stars 66 forks source link

db.remove({}, {multi: true}) only remove one item at a time #79

Closed NortacYWang closed 1 year ago

NortacYWang commented 1 year ago

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

NortacYWang commented 1 year ago

oh, sorry, it was my bad, I did not apply removeAll function to my customized messageDB class. Now it is fixed. Thanks