Interface CollectionInsertManyResult<RSchema>

Represents the result of an insertMany command on a collection.

Field

insertedIds - The IDs of the inserted documents.

Field

insertedCount - The number of inserted documents.

See

Collection.insertMany

interface CollectionInsertManyResult<RSchema> {
    insertedCount: number;
    insertedIds: IdOf<RSchema>[];
}

Type Parameters

  • RSchema

Properties

insertedCount: number

The number of inserted documents (equals insertedIds.length).

insertedIds: IdOf<RSchema>[]

The IDs of the inserted documents (including the autogenerated IDs).

Note that it is up to the user that the IDs cover all possible types of IDs that the collection may have, keeping in mind the type of the auto-generated IDs, as well as any the user may provide.