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

MongoJS supports bulk updates? #152

Closed
ECAbrahamse opened this issue Oct 1, 2014 · 5 comments
Closed

MongoJS supports bulk updates? #152

ECAbrahamse opened this issue Oct 1, 2014 · 5 comments

Comments

@ECAbrahamse
Copy link

MongoJS does not seem to support bulk updates using "collection.initializeUnorderedBulkOp()", while the regular mongodb driver does.
See http://stackoverflow.com/questions/25990630/node-mongojs-and-bulk-operations for example code.

Will this be added to MongoJS ?
Or is it already there and I am not using it in the correct way?

@sorribas
Copy link
Collaborator

sorribas commented Oct 1, 2014

This is not supported yet. We'll keep this issue open and discuss what would be the best way to implement this without getting too far away from the mongo shell API.

@sorribas
Copy link
Collaborator

sorribas commented Oct 2, 2014

Small update, I found this API on the mongo shell docs.

http://docs.mongodb.org/manual/reference/method/js-bulk/

This is the way the shell supports bulk operations, and as always, we would like to keep the api as close to the shell as possible, so this is the API we will be implementing in mongojs.

@ECAbrahamse
Copy link
Author

And that would include the initializeUnorderedBulkOp() function as mentioned in the example.
Good! That is what I expected and hoped for. Since the mongodb node driver already supports these operations I hope implementation in mongojs will not be too complex. Thanks!

sorribas added a commit that referenced this issue Oct 5, 2014
@sorribas
Copy link
Collaborator

sorribas commented Oct 5, 2014

I just added this feature and published it in 0.15.0

@sorribas sorribas closed this as completed Oct 5, 2014
@ECAbrahamse
Copy link
Author

Great job. Thanks for the fast response!

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

No branches or pull requests

2 participants