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

Class representing the result of a MongoDB bulk write operation. More...

#include <bulk_write.hpp>

Public Member Functions

 bulk_write (bsoncxx::document::value raw_response)
 
std::int32_t inserted_count () const
 Gets the number of documents that were inserted during this 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...
 
std::int32_t deleted_count () const
 Gets the number of documents that were deleted during this operation. More...
 
std::int32_t upserted_count () const
 Gets the number of documents that were upserted during this operation. More...
 
id_map upserted_ids () const
 Gets the ids of the upserted documents. More...
 

Detailed Description

Class representing the result of a MongoDB bulk write operation.

Constructor & Destructor Documentation

mongocxx::result::bulk_write::bulk_write ( bsoncxx::document::value  raw_response)
explicit
Todo:
documment this method

Member Function Documentation

std::int32_t mongocxx::result::bulk_write::deleted_count ( ) const

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

Returns
The number of documents that were deleted.
std::int32_t mongocxx::result::bulk_write::inserted_count ( ) const

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

Returns
The number of documents that were inserted.
std::int32_t mongocxx::result::bulk_write::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::bulk_write::modified_count ( ) const

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

Returns
The number of documents that were modified.
std::int32_t mongocxx::result::bulk_write::upserted_count ( ) const

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

Returns
The number of documents that were upserted.
id_map mongocxx::result::bulk_write::upserted_ids ( ) const

Gets the ids of the upserted documents.

Note
The returned id_map must not be accessed after the bulk_write object is destroyed.
Returns
A map from bulk write index to _id field for upserted documents.

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