Skip to content

DOCSP-31807: includeResultMetadata option behavior changes for findOneAnd... methods #750

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 4 commits into from
Aug 24, 2023

Conversation

rustagir
Copy link
Collaborator

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-31807
Staging:

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

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

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

Very minor clarifications. Looks good overall.

Comment on lines 54 to 55
``false``, which means each method returns either the matched document
or ``null`` if no document is matched. If you set
Copy link
Collaborator

Choose a reason for hiding this comment

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

S: To reduce ambiguity. Definitely open to alternatives!

Suggested change
``false``, which means each method returns either the matched document
or ``null`` if no document is matched. If you set
``false``, which means each method returns the matched document,
if one is found, or ``null``. If you set

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

edited slightly

Copy link
Collaborator

@mongoKart mongoKart Aug 24, 2023

Choose a reason for hiding this comment

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

not a blocking change, but there's still ambiguity around what the method returns and under which conditions. i.e., this sentence could also mean "If no document is matched, the method returns either the matched document or null."

putting the condition in a parenthetical tied to the first case (what i suggested above) is one way to handle this, but there are probably others. one other option:

false, which means each method returns the matched document
or, if no document is found, null. If you set

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that this seems ambiguous, but please don't use a parenthetical to distinguish the two cases per the style guide. Another potential solution is to separate it into two sentences.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oddly, "parenthetical" can mean any interjection of qualifying or explanatory information--even when it's offset by commas. That's what I meant here.

@rustagir rustagir requested a review from mongoKart August 24, 2023 16:15
Copy link
Collaborator

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

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

LGTM + 1 suggestion

@rustagir rustagir merged commit f4586e6 into mongodb:master Aug 24, 2023
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
…eAnd... methods (mongodb#750)

* DOCSP-31807: includeResultMetadata option behavior changes

* MW PR fixes 1

* small fixes

* MW suggestion
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.

3 participants