Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-41127: insert docs #20
DOCSP-41127: insert docs #20
Changes from 1 commit
843f43a
d942db0
21d0a51
dd4a792
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
suggestion: rename collection to "restaurants" so that it is clearer that we're inserting into the restaurants collection, especially since the user doesn't get to see the code declaring the collection/getting the collection
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.
if you do this, change the code that says "collection" to "restaurants"
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 would prefer not to do this, as different pages use different sample data (this repo uses restaurants and movies off the top of my head). I dont think that the code examples here are supposed to necessarily be runnable, moreso demonstrate/explain the API for performing certain tasks.
I think keeping the variable name as
collection
also makes it clear that you are performing the update operation on aMongoCollection
instance aka at the collection lvlThere 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: Clarify that the parameter is the second parameter that you pass into the method/last paramater
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: Introduce InsertOneOptions as the name of the options class somewhere here. Currently, you only introduce it when you introduce the table, which is a little confusing.
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.
Q: Is ordered() only applicable to insertmanyoptions?
S: instead of having the ordered method be in the copy where people might overlook it, make a new table with just one entry and have the ordered() method in the table with a description.
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.
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.
It might be confusing to use option and method interchangeably, I will workshop different phrasing.
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: Make these a table rather than a bulleted list, for consistency
Applies to all