-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-49976 Update Documents #517
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
base: comp-cov
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-golang ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
17a127e
to
2dee410
Compare
source/crud/update.txt
Outdated
Use the ``UpdateOne()`` or ``UpdateByID()`` method to update a single | ||
document. | ||
|
||
Use the ``UpdateMany()`` method to update multiple documents. |
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: add this information to the list of methods
eg
UpdateByID()
: Update a single document based on its ID etc
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.
Let me know what you think about changes.
@@ -116,7 +106,7 @@ and descriptions </reference/operator/update-field/>`. | |||
</tutorial/update-documents-with-aggregation-pipeline/>`. | |||
|
|||
Return Values |
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: consider moving this section after the examples
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.
I think this section makes sense where it is. Components of the method signature are introduced first, followed by the practical examples.
@@ -167,7 +157,7 @@ The following document describes an employee: | |||
... | |||
} |
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: consider updating this page to use Atlas sample data instead
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.
Updated the ex!
source/crud/update.txt
Outdated
// results truncated | ||
... | ||
{ "_id" : "10091713", ... , "name" : "Surry Hills Studio", ... , "price" : 181.00, ... }, | ||
{ "_id" : "9908871", ... , "name" : "Family friendly beach house", ... , "price" : 751.00, ... }, | ||
{ "_id" : "20989061", ... , "name" : "Big and sunny Narraben room", ... , "price" : 60.00, ... }, | ||
... |
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: the results here don't really add much value. Consider just adapting the example to have an output that shows the actual output of running the 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.
That's fair, I deleted this output. UpdateMany() returns the count of documents updated, so I put 609 (return value) in monospace to hopefully highlight that a bit more. Let me know what you think!
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.
mostly lgtm except for the missing content under "sample data." Feel free to re-request if you want!
Sample Data | ||
~~~~~~~~~~~ |
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; It looks like there's no content under this heading, is it missing or is this heading in the wrong place?
aggregation pipelines, see our tutorial on performing | ||
:manual:`updates with aggregation pipelines | ||
</tutorial/update-documents-with-aggregation-pipeline/>`. |
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.
aggregation pipelines, see our tutorial on performing | |
:manual:`updates with aggregation pipelines | |
</tutorial/update-documents-with-aggregation-pipeline/>`. | |
aggregation pipelines, see the :manual:`Updates with Aggregation Pipeline | |
</tutorial/update-documents-with-aggregation-pipeline/>` tutorial in the Server manual. |
See our :ref:`upsert guide <golang-upsert-guide>` | ||
to learn how to insert a new document if no documents match the query filter. |
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: try to remove first person where possible
See our :ref:`upsert guide <golang-upsert-guide>` | |
to learn how to insert a new document if no documents match the query filter. | |
See the :ref:`upsert guide <golang-upsert-guide>` | |
to learn how to insert a new document if no documents match the query filter. |
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-49976
Staging Links
https://deploy-preview-517--docs-golang.netlify.app/crud/update/
https://deploy-preview-517--docs-golang.netlify.app/crud/query/retrieve/
Self-Review Checklist