MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::result::bulk_write Class Reference

#include <mongocxx/v_noabi/mongocxx/result/bulk_write.hpp>

Description

Class representing the result of a MongoDB bulk write operation.

Public Member Functions

std::int32_t deleted_count () const
 Gets the number of documents that were deleted during this operation.
 
std::int32_t inserted_count () const
 Gets the number of documents that were inserted during this operation.
 
std::int32_t matched_count () const
 Gets the number of documents that were matched during this operation.
 
std::int32_t modified_count () const
 Gets the number of documents that were modified during this operation.
 
std::int32_t upserted_count () const
 Gets the number of documents that were upserted during this operation.
 
id_map upserted_ids () const
 Gets the ids of the upserted documents.
 

Member Function Documentation

◆ deleted_count()

std::int32_t mongocxx::v_noabi::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.

◆ inserted_count()

std::int32_t mongocxx::v_noabi::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.

◆ matched_count()

std::int32_t mongocxx::v_noabi::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.

◆ modified_count()

std::int32_t mongocxx::v_noabi::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.
Exceptions
withserver versions below 2.6 due to the field nModified not being returned.

◆ upserted_count()

std::int32_t mongocxx::v_noabi::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.

◆ upserted_ids()

id_map mongocxx::v_noabi::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: