-
Notifications
You must be signed in to change notification settings - Fork 52
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
DOCSP-31807: includeResultMetadata option behavior changes for findOneAnd... methods #750
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.
Very minor clarifications. Looks good overall.
``false``, which means each method returns either the matched document | ||
or ``null`` if no document is matched. If you set |
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: To reduce ambiguity. Definitely open to alternatives!
``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 |
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.
edited slightly
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.
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
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 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.
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.
Oddly, "parenthetical" can mean any interjection of qualifying or explanatory information--even when it's offset by commas. That's what I meant here.
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.
LGTM + 1 suggestion
…eAnd... methods (mongodb#750) * DOCSP-31807: includeResultMetadata option behavior changes * MW PR fixes 1 * small fixes * MW suggestion
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-31807
Staging:
Self-Review Checklist