MongoDB C++ Driver
mongocxx-3.6.2
|
17 #include <bsoncxx/array/view_or_value.hpp>
18 #include <bsoncxx/document/view_or_value.hpp>
19 #include <bsoncxx/stdx/optional.hpp>
20 #include <mongocxx/hint.hpp>
21 #include <mongocxx/stdx.hpp>
23 #include <mongocxx/config/prelude.hpp>
24 #include <mongocxx/pipeline.hpp>
27 MONGOCXX_INLINE_NAMESPACE_BEGIN
47 class _empty_doc_tag {
48 _empty_doc_tag() =
default;
83 std::initializer_list<_empty_doc_tag> update);
123 const stdx::optional<bsoncxx::document::view_or_value>&
collation()
const;
145 const stdx::optional<class hint>&
hint()
const;
167 const stdx::optional<bool>&
upsert()
const;
193 stdx::optional<bsoncxx::document::view_or_value> _collation;
194 stdx::optional<bsoncxx::array::view_or_value> _array_filters;
195 stdx::optional<bool> _upsert;
196 stdx::optional<class hint> _hint;
200 MONGOCXX_INLINE_NAMESPACE_END
203 #include <mongocxx/config/postlude.hpp>
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
update_one(bsoncxx::document::view_or_value filter, std::initializer_list< _empty_doc_tag > update)
Constructs an update operation that will modify a single document matching the filter.
update_one(bsoncxx::document::view_or_value filter, const pipeline &update)
Constructs an update operation that will modify a single document matching the filter.
update_one & collation(bsoncxx::document::view_or_value collation)
Sets the collation for this update operation.
update_one & hint(class hint index_hint)
Sets the index to use for this operation.
const bsoncxx::document::view_or_value & filter() const
Gets the filter.
update_one(bsoncxx::document::view_or_value filter, bsoncxx::document::view_or_value update)
Constructs an update operation that will modify a single document matching the filter.
const bsoncxx::document::view_or_value & update() const
Gets the update document.
const stdx::optional< bsoncxx::document::view_or_value > & collation() const
Gets the collation option for this update operation.
const stdx::optional< bool > & upsert() const
Gets the current value of the upsert option.
update_one & upsert(bool upsert)
Sets the upsert option.
const stdx::optional< class hint > & hint() const
Gets the current hint.
Class representing a hint to be passed to a database operation.
Definition: hint.hpp:32
Class representing a MongoDB aggregation pipeline.
Definition: pipeline.hpp:38
update_one & array_filters(bsoncxx::array::view_or_value array_filters)
Set array filters for this update operation.
const stdx::optional< bsoncxx::array::view_or_value > & array_filters() const
Get array filters for this operation.
Class representing a MongoDB update operation that modifies a single document.
Definition: update_one.hpp:34