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

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

## Description

The result of a "replaceOne" operation.

Supported fields include:

- result

See also
  - Update Methods (MongoDB Manual)

## Public Member Functions

| replace_one_result (replace_one_result &&other) noexcept
| Move constructor.
| replace_one_result (replace_one_result const &other)
| Copy construction.
| ~replace_one_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.
replace_one_result & | operator= (replace_one_result &&other) noexcept
| Move assignment.
replace_one_result & | operator= (replace_one_result const &other)
| Copy assignment.
v1::bulk_write::result | result () const
| Return the raw bulk write result.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > | upserted_id () const
| Return the upserted document ID.

## Friends

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

## Constructor & Destructor Documentation

## ~replace_one_result()

mongocxx::v1::replace_one_result::~replace_one_result | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## replace_one_result() [1/2]

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

noexcept

Move constructor.

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

## replace_one_result() [2/2]

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

Copy construction.

## Member Function Documentation

## matched_count()

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

Return the number of documents that matched the filter.

## modified_count()

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

Return the number of documents that were modified.

## operator=() [1/2]

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

noexcept

Move assignment.

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

## operator=() [2/2]

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

Copy assignment.

## result()

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

Return the raw bulk write result.

## upserted_id()

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > mongocxx::v1::replace_one_result::upserted_id | ( |  | ) | const

Return the upserted document ID.

Returns
  Empty when no document was upserted.

## Friends And Related Symbol Documentation

## operator!=

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

friend

Compare equal when all supported fields compare equal.

## operator==

bool operator== | ( | replace_one_result const & | lhs,
|  | replace_one_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/replace_one_result.hpp