File tree Expand file tree Collapse file tree 3 files changed +28
-258
lines changed
includes/fundamentals/code-snippets/bulk-write Expand file tree Collapse file tree 3 files changed +28
-258
lines changed Original file line number Diff line number Diff line change 1
1
.. _java-fundamentals-bulkwrite:
2
+ .. _java-usage-bulkwrite:
2
3
3
4
===============
4
5
Bulk Operations
@@ -358,6 +359,32 @@ see the following API documentation:
358
359
- `BulkWriteOptions <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/BulkWriteOptions.html>`__
359
360
- `ordered() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/BulkWriteOptions.html#ordered(boolean)>`__
360
361
362
+
363
+ Example File
364
+ ~~~~~~~~~~~~
365
+
366
+ The following code is a complete, standalone file that performs an ordered bulk
367
+ write operation on the ``movies`` collection in the ``sample_mflix`` database.
368
+ The example call to ``bulkWrite()`` includes examples of the ``InsertOneModel``,
369
+ ``UpdateOneModel``, and ``DeleteOneModel``.
370
+
371
+ .. include:: /includes/connect-guide-note.rst
372
+
373
+ .. io-code-block::
374
+
375
+ .. input:: /includes/usage-examples/code-snippets/BulkWrite.java
376
+ :language: java
377
+ :dedent:
378
+
379
+ .. output::
380
+ :language: none
381
+ :visible: false
382
+
383
+ Result statistics:
384
+ inserted: 3
385
+ updated: 2
386
+ deleted: 1
387
+
361
388
.. _java-sync-client-bulk-write:
362
389
363
390
Client Bulk Write
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- .. _java-usage-bulkwrite:
1
+
2
2
3
3
=======================
4
4
Perform Bulk Operations
You can’t perform that action at this time.
0 commit comments