-
Notifications
You must be signed in to change notification settings - Fork 7
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-41134: Retrieve Data #6
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.
a few things!
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.
Left some more suggestions!
source/read/retrieve.txt
Outdated
The ``find()`` method retrieves documents from a collection. This | ||
method takes a **query filter** and returns all matching documents. A query filter is a | ||
document that specifies the criteria that the driver uses to match documents from the | ||
collection. | ||
|
||
.. To learn more about query filters, see :ref:`kotlin-sync-specify-query`. |
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: Add a TODO here because it makes these easy to find if they fall through the cracks
source/includes/read/retrieve.kt
Outdated
// end-find | ||
|
||
// start-find-iterate | ||
val resultsToPrint = collection.find(eq("cuisine", "Spanish")) |
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: even though it produces errors in the IDE, can you call all of these variables just results
Also applies to lines 26, 32, 36
source/read/retrieve.txt
Outdated
.. literalinclude:: /includes/read/retrieve.kt | ||
:start-after: start-find-iterate | ||
:end-before: end-find-iterate | ||
:language: kotlin | ||
:copyable: | ||
:dedent: |
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: convert this to an IO code block and show some sample documents returned
source/includes/read/retrieve.kt
Outdated
// end-find-all | ||
|
||
// start-modified-find | ||
val modifiedResults = collection.find(eq("cuisine", "Spanish")).limit(10).maxTime(10000) |
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: reduce horizontal scroll
val modifiedResults = collection.find(eq("cuisine", "Spanish")).limit(10).maxTime(10000) | |
val modifiedResults = collection | |
.find(eq("cuisine", "Spanish")) | |
.limit(10) | |
.maxTime(10000) |
source/read/retrieve.txt
Outdated
* - ``collation()`` | ||
- | An instance of the ``Collation`` class that sets the collation options. |
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: change all descriptions to be the same part of speech
* - ``collation()`` | |
- | An instance of the ``Collation`` class that sets the collation options. | |
* - ``collation()`` | |
- | Sets the collation options for the query. |
source/read/retrieve.txt
Outdated
* - ``comment()`` | ||
- | A string to attach to the query. This can help you trace and interpret the | ||
operation in the server logs and in profile data. To learn more about query comments, | ||
see :manual:`$comment </reference/operator/query/comment/>` in the MongoDB Server | ||
manual. |
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.
* - ``comment()`` | |
- | A string to attach to the query. This can help you trace and interpret the | |
operation in the server logs and in profile data. To learn more about query comments, | |
see :manual:`$comment </reference/operator/query/comment/>` in the MongoDB Server | |
manual. | |
* - ``comment()`` | |
- | Specifies a string to attach to the query. This can help you trace and interpret the | |
operation in the server logs and in profile data. To learn more about query comments, | |
see :manual:`$comment </reference/operator/query/comment/>` in the MongoDB Server | |
manual. |
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.
and so on
source/read/retrieve.txt
Outdated
For runnable code examples of retrieving documents with the {+driver-short+}, see | ||
:ref:`kotlin-sync-read`. |
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.
For runnable code examples of retrieving documents with the {+driver-short+}, see | |
:ref:`kotlin-sync-read`. | |
To view runnable code examples that retrieve documents by using the {+driver-short+}, see | |
:ref:`kotlin-sync-read`. |
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.
Great work! thanks for addressing all my feedback in a timely way
source/read/retrieve.txt
Outdated
free MongoDB Atlas cluster and load the sample datasets, see the | ||
:atlas:`Get Started with Atlas </getting-started>` guide. | ||
|
||
This data is modeled with the following Kotlin data class: |
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: use language
source constant where applicable
This data is modeled with the following Kotlin data class: | |
The documents in this collection are modeled by the following {+language+} data class: |
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!
(cherry picked from commit 1db6789)
(cherry picked from commit 1db6789)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-41134
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/kotlin-sync/DOCSP-41134/read/retrieve/
Self-Review Checklist