Type alias CollectionInsertManyOptions

CollectionInsertManyOptions: GenericInsertManyOptions
Overview

The options for an insertMany command on a collection.

🚨Important: The options depend on the ordered parameter. If ordered is true, then the concurrency option is not allowed.

Example

const result = await collection.insertMany([
{ name: 'John', age: 30 },
{ name: 'Jane', age: 25 },
], {
ordered: true,
timeout: 60000,
});

Example

const result = await collection.insertMany([
{ name: 'John', age: 30 },
{ name: 'Jane', age: 25 },
], {
concurrency: 16, // ordered implicitly `false` if unset
});

Datatypes

See Collection's documentation for information on the available datatypes for collections.

See

  • Collection.insertMany
  • CollectionInsertManyResult