Skip to content

Commit 289864a

Browse files
DOCSP-50652-insertMany-missing-brackets (#12369) (#12373)
1 parent 71acac1 commit 289864a

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

content/manual/manual/source/core/index-unique.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ that are all missing the ``grade`` field.
263263

264264
.. code-block:: javascript
265265

266-
db.students.insertMany(
267-
{ "name": "Meredith", "age": 12 },
268-
{ "name": "Olivia", "age": 11 },
269-
{ "name": "Benjamin" }
270-
)
266+
db.students.insertMany( [
267+
{ "name": "Meredith", "age": 12 },
268+
{ "name": "Olivia", "age": 11 },
269+
{ "name": "Benjamin" }
270+
] )
271271

272272
However, you cannot insert a document that has the same index key (value
273273
for ``name``, ``age``, and ``grade``) as another document in the

content/manual/manual/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ that include the ``language`` field:
4141

4242
.. code-block:: javascript
4343

44-
db.quotes.insertMany(
44+
db.quotes.insertMany( [
4545
{
4646
_id: 1,
4747
language: "portuguese",
@@ -83,7 +83,7 @@ that include the ``language`` field:
8383
quote: "Es este un puñal que veo delante de mí."
8484
}
8585
}
86-
)
86+
] )
8787

8888
Procedure
8989
---------

content/manual/v6.0/source/core/index-unique.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ that are all missing the ``grade`` field.
260260

261261
.. code-block:: javascript
262262

263-
db.students.insertMany(
264-
{ "name": "Meredith", "age": 12 },
265-
{ "name": "Olivia", "age": 11 },
266-
{ "name": "Benjamin" }
267-
)
263+
db.students.insertMany( [
264+
{ "name": "Meredith", "age": 12 },
265+
{ "name": "Olivia", "age": 11 },
266+
{ "name": "Benjamin" }
267+
] )
268268

269269
However, you cannot insert a document that has the same index key (value
270270
for ``name``, ``age``, and ``grade``) as another document in the

content/manual/v7.0/source/core/index-unique.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ that are all missing the ``grade`` field.
260260

261261
.. code-block:: javascript
262262

263-
db.students.insertMany(
264-
{ "name": "Meredith", "age": 12 },
265-
{ "name": "Olivia", "age": 11 },
266-
{ "name": "Benjamin" }
267-
)
263+
db.students.insertMany( [
264+
{ "name": "Meredith", "age": 12 },
265+
{ "name": "Olivia", "age": 11 },
266+
{ "name": "Benjamin" }
267+
] )
268268

269269
However, you cannot insert a document that has the same index key (value
270270
for ``name``, ``age``, and ``grade``) as another document in the

content/manual/v7.0/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ that include the ``language`` field:
4141

4242
.. code-block:: javascript
4343

44-
db.quotes.insertMany(
44+
db.quotes.insertMany( [
4545
{
4646
_id: 1,
4747
language: "portuguese",
@@ -83,7 +83,7 @@ that include the ``language`` field:
8383
quote: "Es este un puñal que veo delante de mí."
8484
}
8585
}
86-
)
86+
] )
8787

8888
Procedure
8989
---------

0 commit comments

Comments
 (0)