MongoDB Driver API for Node.js (original) (raw)
Class: BulkWriteError
BulkWriteError
An error indicating an unsuccessful Bulk Write
new BulkWriteError(message, result)
Creates a new BulkWriteError
Name | Type | Description |
---|---|---|
message | Error|string | object |
result | BulkWriteResult | The result of the bulk write operation |
Extends
Members
deletedCount
Number of documents deleted.
errmsg
Legacy name for server error responses
insertedCount
Number of documents inserted.
insertedIds
Inserted document generated Id's, hash key is the index of the originating operation
matchedCount
Number of documents matched for update.
modifiedCount
Number of documents modified.
upsertedCount
Number of documents upserted.
upsertedIds
Upserted document generated Id's, hash key is the index of the originating operation
Methods
Checks the error to see if it has an error label
Name | Type | Description |
---|---|---|
label | string | The error label to check for |
Returns:
true if the error has the provided error label