Class BulkWriteResult

The result of a bulk write.

Properties

deletedCount: number

Number of documents deleted.

insertedCount: number

Number of documents inserted.

insertedIds: {
    [key: number]: any;
}

Inserted document generated Id's, hash key is the index of the originating operation

matchedCount: number

Number of documents matched for update.

modifiedCount: number

Number of documents modified.

upsertedCount: number

Number of documents upserted.

upsertedIds: {
    [key: number]: any;
}

Upserted document generated Id's, hash key is the index of the originating operation

Accessors

  • get ok(): number
  • Evaluates to true if the bulk operation correctly executes

    Returns number

Methods

  • Returns the number of write errors off the bulk operation

    Returns number

  • Returns true if the bulk operation contains a write error

    Returns boolean