Interface InsertManyResult<TSchema>

interface InsertManyResult<TSchema> {
    acknowledged: boolean;
    insertedCount: number;
    insertedIds: {
        [key: number]: InferIdType<TSchema>;
    };
}

Type Parameters

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

insertedCount: number

The number of inserted documents for this operations

insertedIds: {
    [key: number]: InferIdType<TSchema>;
}

Map of the index of the inserted document to the id of the inserted document