-
Notifications
You must be signed in to change notification settings - Fork 12
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
DOCSP-43071: Bulk operations #54
Conversation
✅ Deploy Preview for docs-c ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
- :ref:`c-write-delete` | ||
- :ref:`c-write-replace` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few suggestions!
source/write/bulk-write.txt
Outdated
- Collection: Specifies the collection to modify | ||
- Options document: Specifies options to customize the operation, or ``NULL`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Collection: Specifies the collection to modify | |
- Options document: Specifies options to customize the operation, or ``NULL`` | |
- **Collection**: Specifies the collection to modify | |
- **Options document**: Specifies options to customize the operation, or ``NULL`` |
source/write/bulk-write.txt
Outdated
To run each write operation queued in the bulk write, call the ``mongoc_bulk_operation_execute()`` | ||
function. This function accepts the following parameters: | ||
|
||
- ``mongoc_bulk_operation_t`` value: Contains the instructions for each write operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[s] Can also bold these terms per the style guide
source/write/update.txt
Outdated
@@ -57,6 +57,8 @@ Each update function accepts the following parameters: | |||
and their usage, see the :manual:`Field Update Operators guide | |||
</reference/operator/update-field/>` in the {+mdb-server+} manual. | |||
|
|||
- Options document: Specifies options to customize the operation, or ``NULL``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[s] This list isn't fully from the diff, but I think the guidance around bolding terms would apply her as well.
source/includes/write/bulk-write.c
Outdated
"restaurant_id", BCON_UTF8 ("1234") | ||
); | ||
|
||
mongoc_bulk_operation_insert_with_opts (bulk, insert_doc, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an out-parameter for a bson_error_t
. Suggest checking the return:
bson_error_t error;
if (!mongoc_bulk_operation_insert_with_opts (bulk, insert_doc, NULL, &error)) {
fprintf (stderr, "error adding insert operation: %s\n", error.message);
}
Suggestion also applies to other mongoc_bulk_operation_*_with_opts
calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one fix.
source/write/bulk-write.txt
Outdated
If any of the write operations fail, the {+driver-short+} raises a | ||
``mongoc_bulkwriteexception_t`` error and does not perform any further operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove mention of mongoc_bulkwriteexception_t
. mongoc_bulkwriteexception_t
applies to the mongoc_bulkwrite_t. mongoc_bulkwrite_t
requires server 8.0. mongoc_bulk_operation_t
can be used with any supported server version.
If any of the write operations fail, the {+driver-short+} raises a | |
``mongoc_bulkwriteexception_t`` error and does not perform any further operations. | |
If any of the write operations fail, the {+driver-short+} sets the output error and does not perform any further operations. |
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-43071
Staging - https://deploy-preview-54--docs-c.netlify.app/write/bulk-write/
Self-Review Checklist