Result class definitions.
Create a BulkWriteResult instance.
Parameters: |
|
---|
Is this the result of an acknowledged write operation?
The acknowledged attribute will be False when using WriteConcern(w=0), otherwise True.
Note
If the acknowledged attribute is False all other attibutes of this class will raise InvalidOperation when accessed. Values for other attributes cannot be determined if the write operation was unacknowledged.
See also
The raw bulk API result.
The number of documents deleted.
The number of documents inserted.
The number of documents matched for an update.
The number of documents modified.
Note
modified_count is only reported by MongoDB 2.6 and later. When connected to an earlier server version, or in certain mixed version sharding configurations, this attribute will be set to None.
The number of documents upserted.
A map of operation index to the _id of the upserted document.
The return type for delete_one() and delete_many()
Is this the result of an acknowledged write operation?
The acknowledged attribute will be False when using WriteConcern(w=0), otherwise True.
Note
If the acknowledged attribute is False all other attibutes of this class will raise InvalidOperation when accessed. Values for other attributes cannot be determined if the write operation was unacknowledged.
See also
The number of documents deleted.
The raw result document returned by the server.
The return type for insert_many().
Is this the result of an acknowledged write operation?
The acknowledged attribute will be False when using WriteConcern(w=0), otherwise True.
Note
If the acknowledged attribute is False all other attibutes of this class will raise InvalidOperation when accessed. Values for other attributes cannot be determined if the write operation was unacknowledged.
See also
A list of _ids of the inserted documents, in the order provided.
Note
If False is passed for the ordered parameter to insert_many() the server may have inserted the documents in a different order than what is presented here.
The return type for insert_one().
Is this the result of an acknowledged write operation?
The acknowledged attribute will be False when using WriteConcern(w=0), otherwise True.
Note
If the acknowledged attribute is False all other attibutes of this class will raise InvalidOperation when accessed. Values for other attributes cannot be determined if the write operation was unacknowledged.
See also
The inserted document’s _id.
The return type for update_one(), update_many(), and replace_one().
Is this the result of an acknowledged write operation?
The acknowledged attribute will be False when using WriteConcern(w=0), otherwise True.
Note
If the acknowledged attribute is False all other attibutes of this class will raise InvalidOperation when accessed. Values for other attributes cannot be determined if the write operation was unacknowledged.
See also
The number of documents matched for this update.
The number of documents modified.
Note
modified_count is only reported by MongoDB 2.6 and later. When connected to an earlier server version, or in certain mixed version sharding configurations, this attribute will be set to None.
The raw result document returned by the server.
The _id of the inserted document if an upsert took place. Otherwise None.