Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connection): add support for Connection.prototype.bulkWrite() with MongoDB server 8.0 #15058

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #15028

Summary

MongoDB server 8.0 supports bulkWrite() on multiple collections with a single command. This PR adds support for that as Connection.prototype.bulkWrite()

MongoDB Node driver expects a namespace parameter on each bulk write operation to determine which collection the bulk write operation applies to. With Mongoose, we instead use a model parameter, which can be either a model class or a model name. We also cast and validate each bulk write operation.

Examples

@vkarpov15 vkarpov15 added this to the 8.9 milestone Nov 24, 2024
@vkarpov15 vkarpov15 changed the base branch from master to 8.9 November 25, 2024 01:44
@vkarpov15 vkarpov15 merged commit 107fe2a into 8.9 Nov 25, 2024
74 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-15028 branch November 26, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mongodb 8 new bulkwrite for multiple collections
2 participants