25#include <initializer_list>
60 class _empty_doc_tag {};
110 : _filter{std::move(
filter)}, _update{std::move(
update)} {}
132 : _filter{std::move(
filter)} {
194 _hint = std::move(index_hint);
211 _sort = std::move(
sort);
273 return _array_filters;
298 return {std::move(v)};
Provides bsoncxx::v_noabi::array::view_or_value.
A BSON array.
Definition value.hpp:41
A BSON document.
Definition value.hpp:46
A polyfill for std::optional<T>.
Definition optional.hpp:799
update_one(v1::bulk_write::update_one op)
Construct with the mongocxx::v1 equivalent.
A single "Update One" write operation.
Definition bulk_write.hpp:210
update_one & array_filters(bsoncxx::v1::array::value v)
Set the "arrayFilters" field.
update_one & upsert(bool v)
Set the "upsert" field.
update_one & sort(bsoncxx::v1::document::value v)
Set the "sort" field.
update_one & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
update_one & hint(v1::hint v)
Set the "hint" field.
A batch of write operations that can be sent to the server as a group.
Definition bulk_write.hpp:54
The index to "hint" or force a MongoDB server to use when performing a query.
Definition hint.hpp:42
A MongoDB update operation that modifies a single document.
Definition update_one.hpp:47
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & hint() const
Gets the current hint.
Definition update_one.hpp:203
update_one & hint(v_noabi::hint index_hint)
Sets the index to use for this operation.
Definition update_one.hpp:193
update_one & sort(bsoncxx::v_noabi::document::view_or_value sort)
Set the sort option.
Definition update_one.hpp:210
bsoncxx::v_noabi::document::view_or_value const & update() const
Gets the update document.
Definition update_one.hpp:150
update_one(bsoncxx::v_noabi::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.
Definition update_one.hpp:131
update_one(bsoncxx::v_noabi::document::view_or_value filter, bsoncxx::v_noabi::document::view_or_value update)
Constructs an update operation that will modify a single document matching the filter.
Definition update_one.hpp:109
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::array::view_or_value > const & array_filters() const
Get array filters for this operation.
Definition update_one.hpp:272
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & collation() const
Gets the collation option for this update operation.
Definition update_one.hpp:177
update_one & collation(bsoncxx::v_noabi::document::view_or_value collation)
Sets the collation for this update operation.
Definition update_one.hpp:163
update_one & array_filters(bsoncxx::v_noabi::array::view_or_value array_filters)
Set array filters for this update operation.
Definition update_one.hpp:258
update_one(v1::bulk_write::update_one op)
Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bool > const & upsert() const
Gets the current value of the upsert option.
Definition update_one.hpp:245
bsoncxx::v_noabi::document::view_or_value const & filter() const
Gets the filter.
Definition update_one.hpp:141
update_one & upsert(bool upsert)
Sets the upsert option.
Definition update_one.hpp:235
update_one(bsoncxx::v_noabi::document::view_or_value filter, pipeline const &update)
Constructs an update operation that will modify a single document matching the filter.
Definition update_one.hpp:120
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & sort() const
Get the current value of the sort option.
Definition update_one.hpp:218
A MongoDB aggregation pipeline.
Definition pipeline.hpp:45
Provides bsoncxx::v_noabi::document::view_or_value.
#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.
v_noabi::view_or_value< view, value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::array::view, v_noabi::array::value>.
Definition view_or_value.hpp:31
v_noabi::view_or_value< v_noabi::document::view, v_noabi::document::value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::document::view, v_noabi::document::value>.
Definition view_or_value.hpp:30
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing bulk write operations.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
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::model::update_one.
Provides bsoncxx::v1::array::value.
Provides entities related to write operations.
Provides bsoncxx::v_noabi::array::view.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides mongocxx::v_noabi::hint.
Provides mongocxx::v_noabi::pipeline.