MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::result::bulk_write Class Reference

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

Description

The result of a MongoDB bulk write operation.

Public Member Functions

 bulk_write (bsoncxx::v_noabi::document::value raw_response)
 bulk_write (v1::bulk_write::result result)
 Construct with the mongocxx::v1 equivalent.
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.
 operator v1::bulk_write::result () &&
 Convert to the mongocxx::v1 equivalent.
 operator v1::bulk_write::result () const &
 Convert to the mongocxx::v1 equivalent.
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.

Constructor & Destructor Documentation

◆ bulk_write() [1/2]

◆ bulk_write() [2/2]

Member Function Documentation

◆ deleted_count()

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

Returns
The number of documents that were deleted.

◆ inserted_count()

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

Returns
The number of documents that were inserted.

◆ matched_count()

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

Returns
The number of documents that were matched.

◆ modified_count()

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

Returns
The number of documents that were modified.

◆ operator v1::bulk_write::result() [1/2]

mongocxx::v_noabi::result::bulk_write::operator v1::bulk_write::result ( ) &&
inlineexplicit

Convert to the mongocxx::v1 equivalent.

Postconditions:
  • *this is in an assign-or-destroy-only state.
Warning
Invalidates all associated views.

◆ operator v1::bulk_write::result() [2/2]

mongocxx::v_noabi::result::bulk_write::operator v1::bulk_write::result ( ) const &
inlineexplicit

Convert to the mongocxx::v1 equivalent.

◆ upserted_count()

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

Returns
The number of documents that were upserted.

◆ upserted_ids()

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: