-
Notifications
You must be signed in to change notification settings - Fork 43
DOCSP-31089: Improve bulk operation examples #438
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-31089: Improve bulk operation examples #438
Conversation
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.
a couple suggestions but lgtm otherwise. nice job.
a second parameter to specify the execution of the bulk operations as | ||
ordered or unordered. |
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:
a second parameter to specify the execution of the bulk operations as | |
ordered or unordered. | |
a second parameter to specify whether the execution of the bulk operations is | |
ordered or unordered. |
- An insert operation for a document where the ``name`` is ``"Zaynab Omar"`` and the | ||
``age`` is ``37`` | ||
- A replace operation for a document where the ``_id`` is ``1`` with a new document | ||
that contains the ``location`` field | ||
- An update operation for a document where the ``name`` is ``"Zaynab Omar"`` to change the ``name`` | ||
field to ``"Zaynab Hassan"`` | ||
- A delete operation for all documents that have an ``age`` value greater than ``50`` |
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: suggestion for clarity/syntax (didn't include it here, but also a good idea to specify which document changing instead of just "a document"--e.g., "updates the first matching document...")
- An insert operation for a document where the ``name`` is ``"Zaynab Omar"`` and the | |
``age`` is ``37`` | |
- A replace operation for a document where the ``_id`` is ``1`` with a new document | |
that contains the ``location`` field | |
- An update operation for a document where the ``name`` is ``"Zaynab Omar"`` to change the ``name`` | |
field to ``"Zaynab Hassan"`` | |
- A delete operation for all documents that have an ``age`` value greater than ``50`` | |
- An operation that inserts a document where the ``name`` is ``"Zaynab Omar"`` and the | |
``age`` is ``37`` | |
- An operation that replaces the document where the ``_id`` is ``1`` with a new document | |
that contains the ``location`` field | |
- An operation that updates a document where the ``name`` is ``"Zaynab Omar"`` to change the ``name`` | |
field to ``"Zaynab Hassan"`` | |
- An operation that deletes all documents where the ``age`` value is greater than ``50`` |
bulkOperations.add(insertDoc); | ||
bulkOperations.add(replaceDoc); | ||
bulkOperations.add(updateDoc); | ||
bulkOperations.add(deleteDoc); |
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.
good change here!
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-31089
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/java/docsworker-xlarge/DOCSP-31089-fix-bulk-examples/fundamentals/crud/write-operations/bulk/
Self-Review Checklist