84 return _result.matched_count();
92 return _result.modified_count();
100 return _result.upserted_count();
109 auto const ids = _result.upserted_ids();
110 auto const iter = ids.find(0);
112 if (iter != ids.end()) {
120 return lhs._result == rhs._result;
124 return !(lhs == rhs);
142 return {std::move(v)};
149 return {std::move(v)};
A polyfill for std::optional<T>.
Definition optional.hpp:799
update(v_noabi::result::bulk_write result)
Definition update.hpp:47
The result of an "updateMany" operation.
Definition update_many_result.hpp:45
The result of an "updateOne" operation.
Definition update_one_result.hpp:46
The result of a MongoDB bulk write operation.
Definition bulk_write.hpp:43
The result of a MongoDB update operation.
Definition update.hpp:42
std::int32_t matched_count() const
Gets the number of documents that were matched during this operation.
Definition update.hpp:83
std::int32_t modified_count() const
Gets the number of documents that were modified during this operation.
Definition update.hpp:91
update(v_noabi::result::bulk_write result)
Definition update.hpp:47
std::int32_t upserted_count() const
Gets the number of documents that were upserted during this operation.
Definition update.hpp:99
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::element > upserted_id() const
If a document was upserted during this operation, gets the _id of the upserted document.
Definition update.hpp:108
operator v1::update_one_result() const
Convert to the mongocxx::v1 equivalent.
operator v1::update_many_result() const
Convert to the mongocxx::v1 equivalent.
v_noabi::result::bulk_write const & result() const
Returns the bulk write result for this update operation.
Definition update.hpp:74
Provides bsoncxx::v_noabi::document::element.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing the result of various commands.
Declares entities whose ABI stability is NOT guaranteed.
bool operator==(std::string str, hint const &hint)
Convenience methods to compare against an index name.
Definition hint.hpp:138
bool operator!=(hint const &hint, std::string str)
Convenience methods to compare against an index name.
Definition hint.hpp:143
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::result::update.
Provides entities used to represent BSON types.
Provides mongocxx::v1::update_many_result.
Provides mongocxx::v1::update_one_result.
Provides std::optional-related polyfills for library API usage.
Provides mongocxx::v_noabi::result::bulk_write.