@@ -36,8 +36,8 @@ To learn how to use the ``BulkWrite()`` method, see the
36
36
37
37
.. _golang-insert-id:
38
38
39
- The `` _id`` Field
40
- -----------------
39
+ The _id Field
40
+ -------------
41
41
42
42
In MongoDB, each document *must* contain a unique ``_id`` field.
43
43
@@ -105,8 +105,8 @@ The following example creates and inserts a document into the
105
105
106
106
Inserted document with _id: ObjectID("...")
107
107
108
- Modify `` InsertOne`` Behavior
109
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
+ Modify InsertOne() Behavior
109
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
110
You can modify the behavior of ``InsertOne()`` by constructing and passing
111
111
an optional ``InsertOneOptions`` struct. The available options to set with
112
112
``InsertOneOptions`` are:
@@ -222,8 +222,8 @@ After running the preceding code, your output resembles the following:
222
222
Inserted document with _id: ObjectID("...")
223
223
Inserted document with _id: ObjectID("...")
224
224
225
- Modify `` InsertMany`` Behavior
226
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225
+ Modify InsertMany() Behavior
226
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
227
228
228
You can modify the behavior of ``InsertMany()`` by constructing
229
229
and passing an optional ``InsertManyOptions`` struct. The available options
@@ -260,8 +260,8 @@ Construct an ``InsertManyOptions`` as follows:
260
260
261
261
.. _golang-ordered-behavior:
262
262
263
- `` Ordered`` Behavior
264
- ~~~~~~~~~~~~~~~~~~~~
263
+ Ordered Behavior
264
+ ~~~~~~~~~~~~~~~~
265
265
266
266
Assume you want to insert the following documents:
267
267
@@ -383,12 +383,6 @@ Select the :guilabel:`Struct` or :guilabel:`bson.D` tab to see the corresponding
383
383
Additional Information
384
384
----------------------
385
385
386
- For runnable examples of the insert operations, see the following usage
387
- examples:
388
-
389
- - :ref:`golang-insert-one`
390
- - :ref:`golang-insert-many`
391
-
392
386
To learn more about performing the operations mentioned, see the
393
387
following guides:
394
388
0 commit comments