diff --git a/examples/src/test/kotlin/QueryDocumentTest.kt b/examples/src/test/kotlin/QueryDocumentTest.kt index e8941d0d..26909ff5 100644 --- a/examples/src/test/kotlin/QueryDocumentTest.kt +++ b/examples/src/test/kotlin/QueryDocumentTest.kt @@ -12,8 +12,6 @@ import org.junit.jupiter.api.TestInstance import java.util.* import kotlin.test.* -// TODO: light refactor on these examples so that they don't collect directly from find() op, but rather assign to val findFlow -// and then collect/println from that for consistency with other examples @TestInstance(TestInstance.Lifecycle.PER_CLASS) internal class QueryDocumentTest { // :snippet-start: query-data-model @@ -67,7 +65,8 @@ internal class QueryDocumentTest { fun comparisonQueryTest() = runBlocking { // :snippet-start: comparison-filter val filter = Filters.gt("qty", 7) - collection.find(filter).collect { println(it) } + val findFlow = collection.find(filter) + findFlow.collect { println(it) } // :snippet-end: // Junit test for the above code val expected = listOf( @@ -75,14 +74,15 @@ internal class QueryDocumentTest { PaintOrder(2, 8, "purple", listOf("B", "D", "F"), 5), PaintOrder(7, 8, "green", listOf("C", "E"), 7) ) - assertEquals(expected, collection.find(filter).toList() ) + assertEquals(expected, findFlow.toList() ) } @Test fun logicalQueryTest() = runBlocking { // :snippet-start: logical-filter val filter = Filters.and(Filters.lte("qty", 5), Filters.ne("color", "pink")) - collection.find(filter).collect { println(it) } + val findFlow = collection.find(filter) + findFlow.collect { println(it) } // :snippet-end: // Junit test for the above code val expected = listOf( @@ -96,21 +96,23 @@ internal class QueryDocumentTest { fun arrayQueryTest() = runBlocking { // :snippet-start: array-filter val filter = Filters.size("vendor", 3) - collection.find(filter).collect { println(it) } + val findFlow = collection.find(filter) + findFlow.collect { println(it) } // :snippet-end: // Junit test for the above code val expected = listOf( PaintOrder(2, 8, "purple", listOf("B", "D", "F"), 5), PaintOrder(8, 7, "black", listOf("A", "C", "D")) ) - assertEquals(expected, collection.find(filter).toList() ) + assertEquals(expected, findFlow.toList() ) } @Test fun elementQueryTest() = runBlocking { // :snippet-start: element-filter val filter = Filters.exists("rating") - collection.find(filter).collect { println(it) } + val findFlow = collection.find(filter) + findFlow.collect { println(it) } // :snippet-end: // Junit test for the above code val expected = listOf( @@ -118,20 +120,21 @@ internal class QueryDocumentTest { PaintOrder(4, 6, "white", listOf("D"), 9), PaintOrder(7, 8, "green", listOf("C", "E"), 7) ) - assertEquals(expected, collection.find(filter).toList() ) + assertEquals(expected, findFlow.toList() ) } @Test fun evaluationQueryTest() = runBlocking { // :snippet-start: evaluation-filter val filter = Filters.regex("color", "k$") - collection.find(filter).collect { println(it) } + val findFlow = collection.find(filter) + findFlow.collect { println(it) } // :snippet-end: // Junit test for the above code val expected = listOf( PaintOrder(6, 3, "pink", listOf("C")), PaintOrder(8, 7, "black", listOf("A", "C", "D")) ) - assertEquals(expected, collection.find(filter).toList() ) + assertEquals(expected, findFlow.toList() ) } } \ No newline at end of file diff --git a/source/examples/generated/QueryDocumentTest.snippet.array-filter.kt b/source/examples/generated/QueryDocumentTest.snippet.array-filter.kt index 0eed2f61..b24ed7ca 100644 --- a/source/examples/generated/QueryDocumentTest.snippet.array-filter.kt +++ b/source/examples/generated/QueryDocumentTest.snippet.array-filter.kt @@ -1,2 +1,3 @@ val filter = Filters.size("vendor", 3) -collection.find(filter).collect { println(it) } +val findFlow = collection.find(filter) +findFlow.collect { println(it) } diff --git a/source/examples/generated/QueryDocumentTest.snippet.comparison-filter.kt b/source/examples/generated/QueryDocumentTest.snippet.comparison-filter.kt index 313385bd..91c755cc 100644 --- a/source/examples/generated/QueryDocumentTest.snippet.comparison-filter.kt +++ b/source/examples/generated/QueryDocumentTest.snippet.comparison-filter.kt @@ -1,2 +1,3 @@ val filter = Filters.gt("qty", 7) -collection.find(filter).collect { println(it) } +val findFlow = collection.find(filter) +findFlow.collect { println(it) } diff --git a/source/examples/generated/QueryDocumentTest.snippet.element-filter.kt b/source/examples/generated/QueryDocumentTest.snippet.element-filter.kt index 2418b040..d5b60ad3 100644 --- a/source/examples/generated/QueryDocumentTest.snippet.element-filter.kt +++ b/source/examples/generated/QueryDocumentTest.snippet.element-filter.kt @@ -1,2 +1,3 @@ val filter = Filters.exists("rating") -collection.find(filter).collect { println(it) } +val findFlow = collection.find(filter) +findFlow.collect { println(it) } diff --git a/source/examples/generated/QueryDocumentTest.snippet.evaluation-filter.kt b/source/examples/generated/QueryDocumentTest.snippet.evaluation-filter.kt index 2a458e6c..41ff9782 100644 --- a/source/examples/generated/QueryDocumentTest.snippet.evaluation-filter.kt +++ b/source/examples/generated/QueryDocumentTest.snippet.evaluation-filter.kt @@ -1,2 +1,3 @@ val filter = Filters.regex("color", "k$") -collection.find(filter).collect { println(it) } +val findFlow = collection.find(filter) +findFlow.collect { println(it) } diff --git a/source/examples/generated/QueryDocumentTest.snippet.logical-filter.kt b/source/examples/generated/QueryDocumentTest.snippet.logical-filter.kt index c9a736f5..ed92d0c4 100644 --- a/source/examples/generated/QueryDocumentTest.snippet.logical-filter.kt +++ b/source/examples/generated/QueryDocumentTest.snippet.logical-filter.kt @@ -1,2 +1,3 @@ val filter = Filters.and(Filters.lte("qty", 5), Filters.ne("color", "pink")) -collection.find(filter).collect { println(it) } +val findFlow = collection.find(filter) +findFlow.collect { println(it) } diff --git a/source/fundamentals/auth.txt b/source/fundamentals/auth.txt index 4b0c1000..61b67310 100644 --- a/source/fundamentals/auth.txt +++ b/source/fundamentals/auth.txt @@ -32,9 +32,8 @@ Edition are as follows: * :ref:`MONGODB-AWS ` * :ref:`X.509 ` -.. TODO (DOCSP-29270) Add back when Enterprise Auth is available -.. To authenticate using ``Kerberos`` or ``LDAP``, see the -.. :doc:`Enterprise Authentication Mechanisms guide `. +To authenticate using ``Kerberos`` or ``LDAP``, see the +:doc:`Enterprise Authentication Mechanisms guide `. For more information on establishing a connection to your MongoDB cluster, read our :doc:`Connection Guide `. diff --git a/source/fundamentals/connection.txt b/source/fundamentals/connection.txt index 60bdb6d8..2c808964 100644 --- a/source/fundamentals/connection.txt +++ b/source/fundamentals/connection.txt @@ -31,6 +31,5 @@ sections: - :ref:`Enable Network Compression ` - :ref:`Enable TLS/SSL on a Connection ` -.. TODO:(DOCSP-29261) Add auth docs back in -.. For information about authenticating with a MongoDB instance, -.. see :ref:`` and :ref:``. +For information about authenticating with a MongoDB instance, +see :ref:`` and :ref:``. diff --git a/source/fundamentals/connection/connect.txt b/source/fundamentals/connection/connect.txt index c3581056..26033033 100644 --- a/source/fundamentals/connection/connect.txt +++ b/source/fundamentals/connection/connect.txt @@ -32,10 +32,9 @@ To learn more about how connection pools work in the driver, see the :ref:`FAQ p All resource usage limits, such as max connections, apply to individual ``MongoClient`` instances. -.. TODO:(DOCSP-29267) add content when MongoClient Settings page is added back -.. To learn about the different settings you can use to control the -.. behavior of your ``MongoClient``, see the guide on -.. :ref:`MongoClient Settings `. +To learn about the different settings you can use to control the +behavior of your ``MongoClient``, see the guide on +:ref:`MongoClient Settings `. .. tip:: @@ -60,13 +59,12 @@ This figure uses the :manual:`Standard Connection String Format ` -.. and select Kotlin from the language dropdown to retrieve your connection -.. string. + If your deployment is on MongoDB Atlas, see the + :atlas:`Atlas driver connection guide ` + and select :guilabel:`Kotlin` from the language dropdown to retrieve your connection + string. The next part of the connection URI contains your credentials if you are using a password-based authentication mechanism. Replace the value of ``user`` diff --git a/source/fundamentals/connection/connection-options.txt b/source/fundamentals/connection/connection-options.txt index 0c52a282..e972ecc1 100644 --- a/source/fundamentals/connection/connection-options.txt +++ b/source/fundamentals/connection/connection-options.txt @@ -192,15 +192,10 @@ parameters of the connection URI to specify the behavior of the client. * - **authMechanism** - string - - Specifies the authentication mechanism + - Specifies the :doc:`authentication mechanism ` that the driver should use if a credential was supplied. -.. TODO:(DOCSP-29261) refactor above to: -.. Specifies the :doc:`authentication mechanism -.. ` that the driver should use if a credential -.. was supplied. - | **Default**: By default, the client picks the most secure mechanism available based on the server version. For possible values, see the server documentation for the diff --git a/source/fundamentals/crud/read-operations/change-streams.txt b/source/fundamentals/crud/read-operations/change-streams.txt index 4c1d0963..9e86525c 100644 --- a/source/fundamentals/crud/read-operations/change-streams.txt +++ b/source/fundamentals/crud/read-operations/change-streams.txt @@ -82,8 +82,7 @@ following text: ... } -.. TODO:(DOCSP-29258) add in -.. For a runnable example, see the :ref:`` usage example page. +For a runnable example, see the :ref:`` usage example page. To learn more about the ``watch()`` method, see the following API documentation: diff --git a/source/fundamentals/crud/write-operations/insert.txt b/source/fundamentals/crud/write-operations/insert.txt index f48f6052..0da6b132 100644 --- a/source/fundamentals/crud/write-operations/insert.txt +++ b/source/fundamentals/crud/write-operations/insert.txt @@ -94,9 +94,7 @@ see the following resources: - `insertOne() <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-one.html>`__ API Documentation - `InsertOneResult <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/result/InsertOneResult.html>`__ API Documentation - Manual Explanation on :manual:`insertOne() ` - -.. TODO(DOCSP-29251): add back -.. - Runnable :doc:`Insert a Document Example ` +- Runnable :doc:`Insert a Document example ` Insert Multiple Documents ------------------------- @@ -169,9 +167,7 @@ see the following resources: - `insertMany() <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-many.html>`__ API Documentation - `InsertManyResult <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/result/InsertManyResult.html>`__ API Documentation - Manual Explanation on :manual:`insertMany() ` - -.. TODO(DOCSP-29251): add back -.. - Runnable :doc:`Insert Multiple Documents Example ` +- Runnable :doc:`Insert Multiple Documents example ` Summary ------- diff --git a/source/includes/fundamentals-sections.rst b/source/includes/fundamentals-sections.rst index 3a80713c..8df69084 100644 --- a/source/includes/fundamentals-sections.rst +++ b/source/includes/fundamentals-sections.rst @@ -17,5 +17,4 @@ Fundamentals section: - :doc:`Encrypt Fields in a Document ` .. TODO : add back in after MVP -.. - :doc:`Transform your Data ` .. - :doc:`Store and Retrieve Large Files in MongoDB ` diff --git a/source/quick-reference.txt b/source/quick-reference.txt index f45087d5..2f6ecbc2 100644 --- a/source/quick-reference.txt +++ b/source/quick-reference.txt @@ -12,8 +12,6 @@ The examples on the page use the following data class to represent MongoDB docum .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.data-model.kt :language: kotlin -.. TODO: when usage examples added back in, add them to links on this page - .. list-table:: :header-rows: 1 :widths: 25 75 @@ -24,6 +22,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Find a Document** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: @@ -41,6 +40,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Find Multiple Documents** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: @@ -64,6 +64,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Insert a Document** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-one.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.insert-document.kt @@ -72,6 +73,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Insert Multiple Documents** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-many.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.insert-multiple-documents.kt @@ -80,6 +82,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Update a Document** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-one.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: @@ -97,6 +100,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Update Multiple Documents** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-many.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: @@ -137,6 +141,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Replace a Document** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/replace-one.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: @@ -154,6 +159,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Delete a Document** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/delete-one.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.delete-document.kt @@ -162,6 +168,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Delete Multiple Documents** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/delete-many.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.delete-multiple-documents.kt @@ -170,6 +177,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Bulk Write** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/bulk-write.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.bulk-write.kt @@ -178,6 +186,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Watch for Changes** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/watch.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. literalinclude:: /examples/generated/QuickReferenceTest.snippet.watch-for-changes.kt @@ -205,6 +214,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Count Documents** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/count-documents.html>`__ + | :ref:`Usage Example ` - .. io-code-block:: :copyable: true @@ -220,6 +230,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **List the Distinct Documents or Field Values** | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/distinct.html>`__ + | :ref:`Usage Example ` - .. io-code-block:: :copyable: true @@ -301,6 +312,7 @@ The examples on the page use the following data class to represent MongoDB docum * - | **Project Document Fields When Retrieving Them** | | `API Documentation <{+api-kotlin+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-find-flow/projection.html>`__ + | :ref:`Usage Example ` | :ref:`Fundamentals ` - .. io-code-block:: diff --git a/source/quick-start.txt b/source/quick-start.txt index fe06e851..edd20836 100644 --- a/source/quick-start.txt +++ b/source/quick-start.txt @@ -148,9 +148,8 @@ of the movie from the sample dataset which should look something like this: cast=[Michael J. Fox, Christopher Lloyd, Lea Thompson, Crispin Glover] ) -.. TODO:(DOCSP-29224): add back in when document data format data classes are documented -.. To learn more about using data classes to store and retrieve data, refer to -.. :ref:`Document Data Format: Data Classes `. +To learn more about using data classes to store and retrieve data, refer to +:ref:`Document Data Format: Data Classes `. If you receive no output or an error, check whether you included the proper connection string in your Kotlin class, and whether you loaded the sample dataset diff --git a/source/usage-examples/updateOne.txt b/source/usage-examples/updateOne.txt index a966b2c0..f88dfcd4 100644 --- a/source/usage-examples/updateOne.txt +++ b/source/usage-examples/updateOne.txt @@ -66,12 +66,8 @@ in the ``movies`` collection of the ``sample_mflix`` database: We use the ``Updates`` builder, a factory class that contains static helper methods, to construct the update document. While you can pass an update document instead of using the builder, the builder provides type checking and -simplified syntax. See the `Updates <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Updates.html>`__ -class documentation for more information. - -.. TODO: (DOCSP-29266) Replace above with link to the Updates builder documentation once available -.. For more information on the ``Updates`` builder, see our -.. :doc:`guide on the Updates builder `. +simplified syntax. See the :doc:`guide on the Updates builder ` +for more information. .. include:: /includes/connect-guide-note.rst