-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-51823 Standardize Distinct usage example #543
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. |
🔄 Deploy Preview for docs-golang processing
|
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.
Looks good! I left a few suggestions
source/crud/query/distinct.txt
Outdated
The following code uses a struct to retrieve distinct values of the | ||
``borough`` field for documents in the ``restaurants`` collection that match | ||
the specified 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: since you already described the code example above, I think you can simplify this description to something like:
The following code uses a struct to retrieve distinct values of the | |
``borough`` field for documents in the ``restaurants`` collection that match | |
the specified filter: | |
The following code uses a struct to retrieve distinct ``borough`` field values of the matching 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.
Applies to the bson.D tab as well
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'm actually fine with restating the purpose of the code example in a bit more detail here. Mostly because people skim, and it might be helpful for bots to have the description right above the code example.
// Brooklyn | ||
// Manhattan | ||
// Queens |
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: up to you, but since you show the sample output I don't think you need this section in the code file
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.
Talked with Stephanie, and we agreed it was best to keep them in! In the case where users copy the code out of their own terminal, they can have the output easily accessible.
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!
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-51823
Staging Links
https://deploy-preview-543--docs-golang.netlify.app/crud/query/distinct/#retrieve-distinct-values-example--full-file
Self-Review Checklist