17 #include <bsoncxx/document/view_or_value.hpp>
18 #include <bsoncxx/stdx/optional.hpp>
19 #include <mongocxx/hint.hpp>
20 #include <mongocxx/stdx.hpp>
22 #include <mongocxx/config/prelude.hpp>
25 inline namespace v_noabi {
42 bsoncxx::document::view_or_value replacement);
49 const bsoncxx::document::view_or_value&
filter()
const;
78 const stdx::optional<bsoncxx::document::view_or_value>&
collation()
const;
100 const stdx::optional<bool>&
upsert()
const;
122 const stdx::optional<class hint>&
hint()
const;
125 bsoncxx::document::view_or_value _filter;
126 bsoncxx::document::view_or_value _replacement;
128 stdx::optional<bsoncxx::document::view_or_value> _collation;
129 stdx::optional<bool> _upsert;
130 stdx::optional<class hint> _hint;
137 #include <mongocxx/config/postlude.hpp>
Class representing a hint to be passed to a database operation.
Definition: hint.hpp:31
Class representing a MongoDB update operation that replaces a single document.
Definition: replace_one.hpp:31
const bsoncxx::document::view_or_value & replacement() const
Gets the replacement document.
const stdx::optional< bsoncxx::document::view_or_value > & collation() const
Gets the collation option for this replacement operation.
replace_one(bsoncxx::document::view_or_value filter, bsoncxx::document::view_or_value replacement)
Constructs an update operation that will replace a single document matching the filter.
replace_one & upsert(bool upsert)
Sets the upsert option.
const stdx::optional< class hint > & hint() const
Gets the current hint.
replace_one & collation(bsoncxx::document::view_or_value collation)
Sets the collation for this replacement operation.
const bsoncxx::document::view_or_value & filter() const
Gets the filter for replacement.
const stdx::optional< bool > & upsert() const
Gets the current value of the upsert option.
replace_one & hint(class hint index_hint)
Sets the index to use for this operation.
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24