Interface InsertManyResult<Schema>

Represents the result of an insertMany command.

Field

insertedIds - The IDs of the inserted documents.

Field

insertedCount - The number of inserted documents.

See

Collection.insertMany

interface InsertManyResult<Schema> {
    insertedCount: number;
    insertedIds: IdOf<Schema>[];
}

Type Parameters

Properties

insertedCount: number

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

insertedIds: IdOf<Schema>[]

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.