-
Notifications
You must be signed in to change notification settings - Fork 10
DOCSP-41819: replace document #29
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
Conversation
👷 Deploy request for docs-kotlin-sync pending review.Visit the deploys page to approve it
|
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, one confusion about the code
source/write/replace.txt
Outdated
operations differs from an update operation, which changes only | ||
specified fields in one or more documents. | ||
|
||
.. tip:: Learn About Update Operations |
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 this part of the text rather than a callout, I'm unsure if making this is a callout is necessary
source/write/replace.txt
Outdated
|
||
The values of ``_id`` fields are immutable. If your replacement document specifies | ||
a value for the ``_id`` field, it must be the same as the ``_id`` value of the | ||
existing document. |
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: If the id value is not the same as the existing document, what happens? An error?
source/write/replace.txt
Outdated
- Description | ||
|
||
* - ``getMatchedCount()`` | ||
- | Indicates the number of documents that matched the query filter, regardless of |
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.
- | Indicates the number of documents that matched the query filter, regardless of | |
- | Returns the number of documents that matched the query filter, regardless of |
source/write/replace.txt
Outdated
how many updates were performed. | ||
|
||
* - ``getModifiedCount()`` | ||
- | Indicates number of documents modified by the update operation. If an updated |
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.
- | Indicates number of documents modified by the update operation. If an updated | |
- | Returns number of documents modified by the update operation. If an updated |
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!
source/includes/write/replace.kt
Outdated
@@ -0,0 +1,41 @@ | |||
import com.mongodb.client.model.Filters | |||
import com.mongodb.client.model.Filters.* |
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.
Nit - is this used?
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.
Just a couple of nits / questions about the Filters.* and Updates.* imports. I dont think they are needed.
source/includes/write/replace.kt
Outdated
import com.mongodb.client.model.Filters.* | ||
import com.mongodb.client.model.ReplaceOptions | ||
import com.mongodb.client.model.UpdateOptions | ||
import com.mongodb.client.model.Updates.* |
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.
Nit - is this used?
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-41819
Staging - https://preview-mongodbrustagir.gatsbyjs.io/kotlin-sync/DOCSP-41819-replace/write/replace/
Self-Review Checklist