Skip to content

DOCSP-30891: includeResultMetadata option #708

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

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

rustagir
Copy link
Collaborator

@rustagir rustagir commented Jul 7, 2023

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-30891
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/node/docsworker-xlarge/DOCSP-30891-includeResultMetadata/fundamentals/crud/compound-operations/

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?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGTM after a couple small tweaks

If you execute each operation separately, another request may alter the
data between the read and write operations. These data changes may not
prevent your operation from succeeding, but they can make error handling
more difficult. When you application has to handle potential errors at
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
more difficult. When you application has to handle potential errors at
more difficult. When your application has to handle potential errors at

Comment on lines 25 to 27
more difficult. When you application has to handle potential errors at
any stage of the process, your application can become brittle and difficult
to test.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: This could be simplified to avoid close repetition of "your application"

Suggested change
more difficult. When you application has to handle potential errors at
any stage of the process, your application can become brittle and difficult
to test.
more difficult. When your application has to handle potential errors at
any stage of the process, it can become brittle and difficult
to test.

- `findOneAndReplace() <{+api+}/classes/Collection.html#findOneAndReplace>`__
matches multiple documents to a supplied query and replaces the first
of those matched documents using the provided replacement document.

All three methods accept an optional ``options`` object with
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: Remove "three" to make it easier to update in the future if methods are added/removed

Suggested change
All three methods accept an optional ``options`` object with
These methods accept an optional ``options`` object with

configure the ``returnDocument`` option, a boolean that determines if
the method returns the pre-update or post-update version of the modified
document.
:doc:`projection </fundamentals/crud/read-operations/project>` options.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: Change this to a :ref: if at all possible

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep - holdover from the first authoring of the page.

@rustagir rustagir merged commit e48edb6 into mongodb:master Jul 7, 2023
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
* DOCSP-30891: includeResultMetadata option

* JS PR fixes
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