Skip to content

Commit b409766

Browse files
committed
update bulk write eg
1 parent b6f35b0 commit b409766

File tree

3 files changed

+28
-258
lines changed

3 files changed

+28
-258
lines changed

source/crud/write-operations/bulk.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. _java-fundamentals-bulkwrite:
2+
.. _java-usage-bulkwrite:
23

34
===============
45
Bulk Operations
@@ -358,6 +359,32 @@ see the following API documentation:
358359
- `BulkWriteOptions <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/BulkWriteOptions.html>`__
359360
- `ordered() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/BulkWriteOptions.html#ordered(boolean)>`__
360361

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+
361388
.. _java-sync-client-bulk-write:
362389

363390
Client Bulk Write

source/includes/fundamentals/code-snippets/bulk-write/BulkWrite.java

Lines changed: 0 additions & 257 deletions
This file was deleted.

source/usage-examples/bulkWrite.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _java-usage-bulkwrite:
1+
22

33
=======================
44
Perform Bulk Operations

0 commit comments

Comments
 (0)