Open meengit opened 8 years ago
I will review this a bit later, short on time currently.
Could this be reviewed and possibly merged please? This would help me a lot in solving a problem I currently have.
Thank you very much for reviewing and commenting.
The pull request is open since
Sep 1, 2016,
or Release v1.1.4 (Feb 5, 2016). If I saw it correctly, tests were not present at this version.
In the meantime, we do not need the db-migrate anymore. However, I am interested writing the tests.
I am not familiar with the project anymore. I have to familiarize myself again. Unfortunately, I am not able to do this before Monday, Feb 19, 2018.
Please let me know if I should write.
@meengit Yes this has been open for too long that is very true. If you want to write the tests for this that would be fantastic and I can just appreciate your spirit :unicorn: even though it has been open for way too long.
I couldn't delete multiple documents. I know
_run
is private, but still thought it would be helpful to suggest to fix it:If you had run till now with something like:
db._run('remove', 'collectionName', { myKey: 'string' });
you couldn't remove many documents.The code to delete many implied to use it as:
db._run('remove', 'collectionName', [{ myKey: 'string' }]);
(check forutil.isArray(options)
) but that would throw an error [1].To keep current code running and not to break stuff I introduced the
removeMany
:db._run('removeMany', 'collectionName', { myKey: 'string' })
1: db.collection.deleteMany()
What do you think? Or did you have an other idea when you checked for
util.isArray(options)
?