Skip to content

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

Open
wants to merge 11 commits into
base: comp-cov
Choose a base branch
from

Conversation

lindseymoore
Copy link
Collaborator

@lindseymoore lindseymoore commented Jun 11, 2025

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

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?
  • Are the page titles greater than 20 characters long and SEO relevant?

Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for docs-golang ready!

Name Link
🔨 Latest commit 748aba1
🔍 Latest deploy log https://app.netlify.com/projects/docs-golang/deploys/684c7b242ed2870008d2ce90
😎 Deploy Preview https://deploy-preview-517--docs-golang.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rustagir rustagir self-requested a review June 12, 2025 15:34
Comment on lines 60 to 63
Use the ``UpdateOne()`` or ``UpdateByID()`` method to update a single
document.

Use the ``UpdateMany()`` method to update multiple documents.
Copy link
Collaborator

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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:
...
}
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the ex!

Comment on lines 226 to 231
// 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, ... },
...
Copy link
Collaborator

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

Copy link
Collaborator Author

@lindseymoore lindseymoore Jun 13, 2025

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!

@lindseymoore lindseymoore requested a review from rustagir June 13, 2025 19:25
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

Successfully merging this pull request may close these issues.

2 participants