Skip to content

Commit d9950ee

Browse files
committed
add api references
1 parent 65b18fe commit d9950ee

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

source/includes/write/bulk.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import com.mongodb.client.model.Filters.*
33
import com.mongodb.kotlin.client.MongoClient
44

55
// start-data-class
6-
data class Restaurant(val name: String, val borough: String, val cuisine: String)
6+
data class Restaurant(
7+
val name: String,
8+
val borough: String,
9+
val cuisine: String
10+
)
711
// end-data-class
812

913
fun main() {

source/write/bulk-write.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ The following example creates an instance of ``DeleteMany``:
178178

179179
.. _kotlin-sync-bulkwrite-method:
180180

181-
Call the bulkWrite() Method
182-
---------------------------
181+
Perform the Bulk Operation
182+
--------------------------
183183

184184
After you define a class instance for each operation you want to perform,
185185
pass a list of these instances to the ``bulkWrite()`` method.
@@ -213,8 +213,8 @@ operation that failed, and details about the exception.
213213
target collection. The driver reports all write concern errors after
214214
attempting all operations, regardless of execution order.
215215

216-
Customize Bulk Write Operations
217-
-------------------------------
216+
Customize Bulk Write Operation
217+
------------------------------
218218

219219
The ``bulkWrite()`` method optionally accepts a parameter which
220220
specifies options you can use to configure the bulk write
@@ -256,7 +256,7 @@ configure a ``BulkWriteOptions`` instance:
256256
variables for the operation. Values must be constant or closed
257257
expressions that don't reference document fields.
258258

259-
The following code creates options and uses the ``ordered()`` method to
259+
The following code creates options and uses the ``ordered(false)`` option to
260260
specify an unordered bulk write. Then, the example uses the
261261
``bulkWrite()`` method to perform a bulk operation:
262262

@@ -271,8 +271,8 @@ reports the errors only after attempting all operations.
271271

272272
.. note::
273273

274-
Unordered bulk operations do not guarantee an order of execution. The order can
275-
differ from the way you list them to optimize the runtime.
274+
Unordered bulk operations do not guarantee an order of execution. The
275+
order can differ from the way you list them to optimize the runtime.
276276

277277
Return Value
278278
------------
@@ -332,3 +332,5 @@ guide, see the following API Documentation:
332332
- `ReplaceOneModel <{+core-api+}/com/mongodb/client/model/ReplaceOneModel.html>`__
333333
- `UpdateManyModel <{+core-api+}/com/mongodb/client/model/UpdateManyModel.html>`__
334334
- `UpdateOneModel <{+core-api+}/com/mongodb/client/model/UpdateOneModel.html>`__
335+
- `BulkWriteOptions <{+core-api+}/com/mongodb/client/model/BulkWriteOptions.html>`__
336+
- `BulkWriteResult <{+core-api+}/com/mongodb/bulk/BulkWriteResult.html>`__

0 commit comments

Comments
 (0)