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/pipeline.hpp>
22 #include <mongocxx/stdx.hpp>
24 #include <mongocxx/config/prelude.hpp>
27 inline namespace v_noabi {
46 class _empty_doc_tag {
47 _empty_doc_tag() =
default;
61 update_one(bsoncxx::document::view_or_value filter, bsoncxx::document::view_or_value update);
82 std::initializer_list<_empty_doc_tag> update);
93 const bsoncxx::document::view_or_value&
filter()
const;
100 const bsoncxx::document::view_or_value&
update()
const;
122 const stdx::optional<bsoncxx::document::view_or_value>&
collation()
const;
144 const stdx::optional<class hint>&
hint()
const;
166 const stdx::optional<bool>&
upsert()
const;
189 bsoncxx::document::view_or_value _filter;
190 bsoncxx::document::view_or_value _update;
192 stdx::optional<bsoncxx::document::view_or_value> _collation;
193 stdx::optional<bsoncxx::array::view_or_value> _array_filters;
194 stdx::optional<bool> _upsert;
195 stdx::optional<class hint> _hint;
202 #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 modifies a single document.
Definition: update_one.hpp:33
const stdx::optional< bsoncxx::array::view_or_value > & array_filters() const
Get array filters for this operation.
update_one & array_filters(bsoncxx::array::view_or_value array_filters)
Set array filters for this update operation.
update_one & upsert(bool upsert)
Sets the upsert option.
const bsoncxx::document::view_or_value & update() const
Gets the update document.
update_one & collation(bsoncxx::document::view_or_value collation)
Sets the collation for this update operation.
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.
const stdx::optional< class hint > & hint() const
Gets the current hint.
const bsoncxx::document::view_or_value & filter() const
Gets the filter.
update_one & hint(class hint index_hint)
Sets the index to use for this operation.
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(bsoncxx::document::view_or_value filter, const pipeline &update)
Constructs an update operation that will modify a single document matching 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.
Class representing a MongoDB aggregation pipeline.
Definition: pipeline.hpp:37
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24