MongoDB C++ Driver  mongocxx-3.0.2
Public Member Functions | List of all members
mongocxx::result::update Class Reference

Class representing the result of a MongoDB update operation. More...

#include <update.hpp>

Public Member Functions

const result::bulk_writeresult () const
 Returns the bulk write result for this update operation. More...
 
std::int32_t matched_count () const
 Gets the number of documents that were matched during this operation. More...
 
std::int32_t modified_count () const
 Gets the number of documents that were modified during this operation. More...
 
stdx::optional< bsoncxx::document::elementupserted_id () const
 If a document was upserted during this operation, gets the _id of the upserted document. More...
 

Detailed Description

Class representing the result of a MongoDB update operation.

Member Function Documentation

std::int32_t mongocxx::result::update::matched_count ( ) const

Gets the number of documents that were matched during this operation.

Returns
The number of documents that were matched.
std::int32_t mongocxx::result::update::modified_count ( ) const

Gets the number of documents that were modified during this operation.

Returns
The number of documents that were modified.
const result::bulk_write& mongocxx::result::update::result ( ) const

Returns the bulk write result for this update operation.

Returns
The raw bulk write result.
stdx::optional<bsoncxx::document::element> mongocxx::result::update::upserted_id ( ) const

If a document was upserted during this operation, gets the _id of the upserted document.

Returns
The value of the _id field for upserted document.

The documentation for this class was generated from the following file: