mongo icon indicating copy to clipboard operation
mongo copied to clipboard

Implement `db.collection.bulkWrite()`

Open Schoude opened this issue 4 years ago β€’ 5 comments

Are there plans on implementing the db.collection.bulkWrite() functionality in one of the next releases?

I ran into a case where I had to update some of the same types of documents but with different fields and different values for each field.

I resorted to using a for a loop now but the cleaner and more efficient way would be to write them in a bulk.

Thank you for the consideration!

Schoude avatar Feb 02 '21 23:02 Schoude

There is no precise plan, we will certainly consider you if you need it. If you can’t wait, you can implement it yourself and submit a PR. The current architecture extension is very easy

manyuanrong avatar Feb 03 '21 02:02 manyuanrong

bulkWrite is the top missing feature in this library, hope it will become a priority for the team and be implemented 🀞🏻

playerx avatar Sep 08 '22 09:09 playerx

any news on this ? I'm porting a library currently using it

Plawn avatar Feb 16 '23 09:02 Plawn

@Plawn try import from npm:mongodb

erfanium avatar Feb 16 '23 09:02 erfanium

@erfanium thanks ! just used it, it worked well

Plawn avatar Feb 16 '23 10:02 Plawn