Skip to content

Commit 25bd3e0

Browse files
garethbjohnsondaprahamian
authored andcommitted
docs: fix misleading code comments
1 parent 8d27e6e commit 25bd3e0

File tree

1 file changed

+13
-13
lines changed
  • docs/reference/content/tutorials

1 file changed

+13
-13
lines changed

docs/reference/content/tutorials/crud.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ The ``updateOne`` and ``updateMany`` methods exist on the ``Collection`` class a
195195
{{% myproject-connect %}}
196196

197197
const col = db.collection('updates');
198-
// Insert a single document
198+
// Insert multiple documents
199199
col.insertMany([{a:1}, {a:2}, {a:2}], function(err, r) {
200200
assert.equal(null, err);
201201
assert.equal(3, r.insertedCount);
@@ -231,7 +231,7 @@ The ``updateOne`` and ``updateMany`` methods exist on the ``Collection`` class a
231231

232232
// Get the updates collection
233233
const col = db.collection('updates');
234-
// Insert a single document
234+
// Insert multiple documents
235235
let r = await col.insertMany([{a:1}, {a:2}, {a:2}]);
236236
assert.equal(3, r.insertedCount);
237237

@@ -280,7 +280,7 @@ The ``deleteOne`` and ``deleteMany`` methods exist on the ``Collection`` class a
280280
{{% myproject-connect %}}
281281

282282
const col = db.collection('removes');
283-
// Insert a single document
283+
// Insert multiple documents
284284
col.insertMany([{a:1}, {a:2}, {a:2}], function(err, r) {
285285
assert.equal(null, err);
286286
assert.equal(3, r.insertedCount);
@@ -305,7 +305,7 @@ The ``deleteOne`` and ``deleteMany`` methods exist on the ``Collection`` class a
305305

306306
// Get the removes collection
307307
const col = db.collection('removes');
308-
// Insert a single document
308+
// Insert multiple documents
309309
let r = await col.insertMany([{a:1}, {a:2}, {a:2}]);
310310
assert.equal(3, r.insertedCount);
311311

@@ -347,7 +347,7 @@ methods, the operation takes a write lock for the duration of the operation in o
347347
{{% myproject-connect %}}
348348

349349
const col = db.collection('findAndModify');
350-
// Insert a single document
350+
// Insert multiple documents
351351
col.insert([{a:1}, {a:2}, {a:2}], function(err, r) {
352352
assert.equal(null, err);
353353
assert.equal(3, r.result.n);
@@ -376,7 +376,7 @@ methods, the operation takes a write lock for the duration of the operation in o
376376

377377
// Get the findAndModify collection
378378
const col = db.collection('findAndModify');
379-
// Insert a single document
379+
// Insert multiple documents
380380
let r = await col.insert([{a:1}, {a:2}, {a:2}]);
381381
assert.equal(3, r.result.n);
382382

@@ -418,7 +418,7 @@ The ``findOneAndDelete`` function is designed to help remove a document.
418418
{{% myproject-connect %}}
419419

420420
const col = db.collection('findAndModify');
421-
// Insert a single document
421+
// Insert multiple documents
422422
col.insert([{a:1}, {a:2}, {a:2}], function(err, r) {
423423
assert.equal(null, err);
424424
assert.equal(3, r.result.n);
@@ -440,7 +440,7 @@ The ``findOneAndDelete`` function is designed to help remove a document.
440440

441441
// Get the findAndModify collection
442442
const col = db.collection('findAndModify');
443-
// Insert a single document
443+
// Insert multiple documents
444444
let r = await col.insert([{a:1}, {a:2}, {a:2}]);
445445
assert.equal(3, r.result.n);
446446

@@ -645,7 +645,7 @@ The following example materializes all the documents from a query using the ``to
645645
{{% myproject-connect %}}
646646

647647
const col = db.collection('find');
648-
// Insert a single document
648+
// Insert multiple documents
649649
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
650650
assert.equal(null, err);
651651
assert.equal(3, r.insertedCount);
@@ -664,7 +664,7 @@ The following example materializes all the documents from a query using the ``to
664664

665665
// Get the collection
666666
const col = db.collection('find');
667-
// Insert a single document
667+
// Insert multiple documents
668668
const r = await col.insertMany([{a:1}, {a:1}, {a:1}]);
669669
assert.equal(3, r.insertedCount);
670670

@@ -719,7 +719,7 @@ The following example uses the ``next`` method.
719719
{{% myproject-connect %}}
720720

721721
const col = db.collection('find');
722-
// Insert a single document
722+
// Insert multiple documents
723723
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
724724
assert.equal(null, err);
725725
assert.equal(3, r.insertedCount);
@@ -742,7 +742,7 @@ much cleaner and easier way to read iteration code.
742742

743743
// Get the collection
744744
const col = db.collection('find');
745-
// Insert a single document
745+
// Insert multiple documents
746746
const r = await col.insertMany([{a:1}, {a:1}, {a:1}]);
747747
assert.equal(3, r.insertedCount);
748748

@@ -771,7 +771,7 @@ The following example uses the ``each`` method.
771771
{{% myproject-connect %}}
772772

773773
const col = db.collection('find');
774-
// Insert a single document
774+
// Insert multiple documents
775775
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
776776
assert.equal(null, err);
777777
assert.equal(3, r.insertedCount);

0 commit comments

Comments
 (0)