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
  - Bulk Write (MongoDB Specifications)
  - Bulk Write Operations (MongoDB Manual)

## 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::view > | delete_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::view > | insert_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.
result & | operator= (result &&other) noexcept
| Move assignment.
result & | operator= (result const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | update_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()

mongocxx::v1::client_bulk_write::result::~result | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## result() [1/2]

mongocxx::v1::client_bulk_write::result::result | ( | result && | other | ) |

noexcept

Move constructor.

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

## result() [2/2]

mongocxx::v1::client_bulk_write::result::result | ( | result const & | other | ) |

Copy construction.

## Member Function Documentation

## delete_results()

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::client_bulk_write::result::delete_results | ( |  | ) | const

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()

std::int64_t mongocxx::v1::client_bulk_write::result::deleted_count | ( |  | ) | const

Return the number of documents deleted.

## insert_results()

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::client_bulk_write::result::insert_results | ( |  | ) | const

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()

std::int64_t mongocxx::v1::client_bulk_write::result::inserted_count | ( |  | ) | const

Return the number of documents inserted.

## matched_count()

std::int64_t mongocxx::v1::client_bulk_write::result::matched_count | ( |  | ) | const

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

## modified_count()

std::int64_t mongocxx::v1::client_bulk_write::result::modified_count | ( |  | ) | const

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()

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::client_bulk_write::result::update_results | ( |  | ) | const

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()

std::int64_t mongocxx::v1::client_bulk_write::result::upserted_count | ( |  | ) | const

Return the number of documents upserted.

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

- mongocxx/v1/client_bulk_write.hpp