MongoDB C++ Driver 4.4.0
Loading...
Searching...
No Matches
mongocxx::client_bulk_write::result Class Reference

#include <mongocxx/v1/client_bulk_write.hpp>

Description

The result of a client bulk write operation.

Summary counts (inserted_count(), upserted_count(), matched_count(), modified_count(), deleted_count()) are always available.

The per-operation result documents (insert_results(), update_results(), delete_results()) are only available when mongocxx::v1::client_bulk_write::options::verbose_results was set to true; otherwise they are empty.

See also

Public Member Functions

 result (result &&other) noexcept
 Move constructor.
 result (result const &other)
 Copy construction.
 ~result ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewdelete_results () const
 Return the per-operation delete results as a document mapping model index to the delete result.
std::int64_t deleted_count () const
 Return the number of documents deleted.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewinsert_results () const
 Return the per-operation insert results as a document mapping model index to the insert result.
std::int64_t inserted_count () const
 Return the number of documents inserted.
std::int64_t matched_count () const
 Return the number of documents matched by update or replace operations.
std::int64_t modified_count () const
 Return the number of documents modified by update or replace operations.
resultoperator= (result &&other) noexcept
 Move assignment.
resultoperator= (result const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewupdate_results () const
 Return the per-operation update results as a document mapping model index to the update result.
std::int64_t upserted_count () const
 Return the number of documents upserted.

Constructor & Destructor Documentation

◆ ~result()

Destroy this object.

Warning
Invalidates all associated views.

◆ result() [1/2]

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ result() [2/2]

Copy construction.

Member Function Documentation

◆ delete_results()

Return the per-operation delete results as a document mapping model index to the delete result.

Returns
Empty when verbose results were not requested.

◆ deleted_count()

Return the number of documents deleted.

◆ insert_results()

Return the per-operation insert results as a document mapping model index to the insert result.

Returns
Empty when verbose results were not requested.

◆ inserted_count()

Return the number of documents inserted.

◆ matched_count()

Return the number of documents matched by update or replace operations.

◆ modified_count()

Return the number of documents modified by update or replace operations.

◆ operator=() [1/2]

result & mongocxx::v1::client_bulk_write::result::operator= ( result && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

result & mongocxx::v1::client_bulk_write::result::operator= ( result const & other)

Copy assignment.

◆ update_results()

Return the per-operation update results as a document mapping model index to the update result.

Returns
Empty when verbose results were not requested.

◆ upserted_count()

Return the number of documents upserted.


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