new BulkWriteResult(){BulkWriteResult}
Create a new BulkWriteResult instance (INTERNAL TYPE, do not instantiate directly)
Properties:
Name | Type | Description |
---|---|---|
ok |
boolean | Did bulk operation correctly execute |
nInserted |
number | number of inserted documents |
nUpdated |
number | number of documents updated logically |
nUpserted |
number | Number of upserted documents |
nModified |
number | Number of documents updated physically on disk |
nRemoved |
number | Number of removed documents |
Returns:
BulkWriteResult instanceMethods
-
getInsertedIds(){Array.<object>}
-
Return an array of inserted ids
-
getLastOp(){object}
-
Retrieve lastOp if available
-
getRawResponse(){object}
-
Return raw internal result
-
getUpsertedIdAt(index){object}
-
Return the upserted id at position x
Name Type Description index
number the number of the upserted id to return, returns undefined if no result for passed in index
-
getUpsertedIds(){Array.<object>}
-
Return an array of upserted ids
-
getWriteConcernError(){WriteConcernError}
-
Retrieve the write concern error if any
-
getWriteErrorAt(index){WriteError}
-
Returns a specific write error object
Name Type Description index
number of the write error to return, returns null if there is no result for passed in index
-
getWriteErrorCount(){number}
-
Returns the number of write errors off the bulk operation
-
getWriteErrors(){Array.<object>}
-
Retrieve all write errors
-
hasWriteErrors(){boolean}
-
Returns true if the bulk operation contains a write error