| Class | Mongo::Operation::Update::BulkResult |
| In: |
lib/mongo/operation/update/bulk_result.rb
|
| Parent: | Operation::Result |
Defines custom behavior of results for an udpate when sent as part of a bulk write.
@since 2.0.0
| MODIFIED | = | 'nModified'.freeze |
The number of modified docs field in the result.
@since 2.0.0 |
|
| UPSERTED | = | 'upserted'.freeze |
The upserted docs field in the
result.
@since 2.0.0 |
Gets the number of documents matched.
@example Get the matched count.
result.n_matched
@return [ Integer ] The number of documents matched.
@since 2.0.0
Gets the number of documents modified. Not that in a mixed sharded cluster a call to update could return nModified (>= 2.6) or not (<= 2.4). If any call does not return nModified we can‘t report a valid final count so set the field to nil.
@example Get the modified count.
result.n_modified
@return [ Integer ] The number of documents modified.
@since 2.0.0