Loading...
Searching...
No Matches
mongocxx::v1::update_many_result Class Reference

`#include <mongocxx/v1/update_many_result.hpp>`

## Description

The result of an "updateMany" operation.

Supported fields include:

- result

See also
  - Update Methods (MongoDB Manual)

## Public Types

using | id_map = v1::bulk_write::result::id_map
| A map from the operation index to the upserted document ID.

## Public Member Functions

| update_many_result (update_many_result &&other) noexcept
| Move constructor.
| update_many_result (update_many_result const &other)
| Copy construction.
| ~update_many_result ()
| Destroy this object.
std::int64_t | matched_count () const
| Return the number of documents that matched the filter.
std::int64_t | modified_count () const
| Return the number of documents that were modified.
update_many_result & | operator= (update_many_result &&other) noexcept
| Move assignment.
update_many_result & | operator= (update_many_result const &other)
| Copy assignment.
v1::bulk_write::result | result () const
| Return the raw bulk write result.
std::int64_t | upserted_count () const
| Return the number of documents that were upserted.
id_map | upserted_ids () const
| Return a map from the operation index to the upserted document ID.

## Friends

bool | operator== (update_many_result const &lhs, update_many_result const &rhs)
| Compare equal when all supported fields compare equal.
bool | operator!= (update_many_result const &lhs, update_many_result const &rhs)
| Compare equal when all supported fields compare equal.

## Member Typedef Documentation

## id_map

using mongocxx::v1::update_many_result::id_map = v1::bulk_write::result::id_map

A map from the operation index to the upserted document ID.

## Constructor & Destructor Documentation

## ~update_many_result()

mongocxx::v1::update_many_result::~update_many_result | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## update_many_result() [1/2]

mongocxx::v1::update_many_result::update_many_result | ( | update_many_result && | other | ) |

noexcept

Move constructor.

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

## update_many_result() [2/2]

mongocxx::v1::update_many_result::update_many_result | ( | update_many_result const & | other | ) |

Copy construction.

## Member Function Documentation

## matched_count()

std::int64_t mongocxx::v1::update_many_result::matched_count | ( |  | ) | const

Return the number of documents that matched the filter.

## modified_count()

std::int64_t mongocxx::v1::update_many_result::modified_count | ( |  | ) | const

Return the number of documents that were modified.

## operator=() [1/2]

update_many_result & mongocxx::v1::update_many_result::operator= | ( | update_many_result && | other | ) |

noexcept

Move assignment.

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

## operator=() [2/2]

update_many_result & mongocxx::v1::update_many_result::operator= | ( | update_many_result const & | other | ) |

Copy assignment.

## result()

v1::bulk_write::result mongocxx::v1::update_many_result::result | ( |  | ) | const

Return the raw bulk write result.

## upserted_count()

std::int64_t mongocxx::v1::update_many_result::upserted_count | ( |  | ) | const

Return the number of documents that were upserted.

## upserted_ids()

id_map mongocxx::v1::update_many_result::upserted_ids | ( |  | ) | const

Return a map from the operation index to the upserted document ID.

Returns
  Empty when the "upserted" field is not present or is empty.

## Friends And Related Symbol Documentation

## operator!=

bool operator!= | ( | update_many_result const & | lhs,
|  | update_many_result const & | rhs )

friend

Compare equal when all supported fields compare equal.

## operator==

bool operator== | ( | update_many_result const & | lhs,
|  | update_many_result const & | rhs )

friend

Compare equal when all supported fields compare equal.

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

- mongocxx/v1/update_many_result.hpp