add stub API for client bulk write#1574
Closed
kevinAlbs wants to merge 3 commits intomongodb:masterfrom
Closed
Conversation
65153b1 to
6d0d076
Compare
6d0d076 to
3a96e7b
Compare
Collaborator
Author
|
Closing. #1590 proposes an API intended for merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a stub to implement the client bulk write API proposed in mongodb/specifications#1534.
This is intended for early feedback, but not to merge.
Rationale
Options
The existing collection bulk write API accepts options in
bson_t *opts:The proposed client bulk write API differs. Setter functions are added for improved type safety and editor auto complete:
Return
The existing collection bulk write API reports results and error information in a
bson_t *reply:This PR notably differs. Getter functions are added for improved type safety and editor auto complete:
Map types are still reported in a
bson_t:There is no existing convenient representation of map types. I expect needing to interact with verbose results is rare.
Errors are returned in
mongoc_bulkwriteexception_t:The maps and lists are reported in the
bson_t **error_document.The
mongoc_bulkwriteexception_tcan outlive themongoc_bulkwrite_t. This is intended to enable wrapping languages to wrapmongoc_bulkwriteexception_twhen throwing an exception.