// Copyright 2009-present MongoDB, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include // IWYU pragma: export // #include #include #include #include #include #include #include #include #include #include #include #include namespace mongocxx { namespace v1 { /// /// Options for an "updateMany" operation. /// /// Supported fields include: /// - `array_filters` ("arrayFilters") /// - `bypass_document_validation` ("bypassDocumentValidation") /// - `collation` /// - `comment` /// - `hint` /// - `let` /// - `read_concern` ("readConcern") /// - `upsert` /// - `write_concern` ("writeConcern") /// /// @see /// - [Update Methods (MongoDB Manual)](https://www.mongodb.com/docs/manual/reference/update-methods/) /// class update_many_options { private: class impl; void* _impl; public: /// /// Destroy this object /// /// @warning Invalidates all associated views. /// MONGOCXX_ABI_EXPORT_CDECL() ~update_many_options(); /// /// Move constructor. /// /// @par Postconditions: /// - `other` is in an assign-or-destroy-only state. /// MONGOCXX_ABI_EXPORT_CDECL() update_many_options(update_many_options&& other) noexcept; /// /// Move assignment. /// /// @par Postconditions: /// - `other` is in an assign-or-destroy-only state. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) operator=(update_many_options&& other) noexcept; /// /// Copy construction. /// MONGOCXX_ABI_EXPORT_CDECL() update_many_options(update_many_options const& other); /// /// Copy assignment. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) operator=(update_many_options const& other); /// /// Default initialization. /// /// @par Postconditions: /// - All supported fields are "unset" or zero-initialized. /// MONGOCXX_ABI_EXPORT_CDECL() update_many_options(); /// /// Set the "bypassDocumentValidation" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) bypass_document_validation(bool v); /// /// Return the current "bypassDocumentValidation" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) bypass_document_validation() const; /// /// Set the "collation" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) collation(bsoncxx::v1::document::value v); /// /// Return the current "collation" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) collation() const; /// /// Set the "hint" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) hint(v1::hint v); /// /// Return the current "hint" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) hint() const; /// /// Set the "let" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) let(bsoncxx::v1::document::value v); /// /// Return the current "let" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional const) let() const; /// /// Set the "comment" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) comment(bsoncxx::v1::types::value v); /// /// Return the current "comment" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional const) comment() const; /// /// Set the "upsert" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) upsert(bool v); /// /// Return the current "upsert" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) upsert() const; /// /// Set the "readConcern" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) read_concern(v1::read_concern v); /// /// Return the current "readConcern" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) read_concern() const; /// /// Set the "writeConcern" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) write_concern(v1::write_concern v); /// /// Return the current "writeConcern" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) write_concern() const; /// /// Set the "arrayFilters" field. /// MONGOCXX_ABI_EXPORT_CDECL(update_many_options&) array_filters(bsoncxx::v1::array::value v); /// /// Return the current "arrayFilters" field. /// MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional) array_filters() const; class internal; }; } // namespace v1 } // namespace mongocxx #include /// /// @file /// Provides @ref mongocxx::v1::update_many_options. ///