// 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 namespace mongocxx { namespace v1 { /// /// The result of a "deleteOne" operation. /// /// Supported fields include: /// - `result` /// /// @see /// - [Delete Methods (MongoDB Manual)](https://www.mongodb.com/docs/manual/reference/delete-methods/) /// class delete_one_result { private: class impl; void* _impl; public: /// /// Destroy this object. /// /// @warning Invalidates all associated views. /// MONGOCXX_ABI_EXPORT_CDECL() ~delete_one_result(); /// /// Move constructor. /// /// @par Postconditions: /// - `other` is in an assign-or-destroy-only state. /// MONGOCXX_ABI_EXPORT_CDECL() delete_one_result(delete_one_result&& other) noexcept; /// /// Move assignment. /// /// @par Postconditions: /// - `other` is in an assign-or-destroy-only state. /// MONGOCXX_ABI_EXPORT_CDECL(delete_one_result&) operator=(delete_one_result&& other) noexcept; /// /// Copy construction. /// MONGOCXX_ABI_EXPORT_CDECL() delete_one_result(delete_one_result const& other); /// /// Copy assignment. /// MONGOCXX_ABI_EXPORT_CDECL(delete_one_result&) operator=(delete_one_result const& other); /// /// Return the raw bulk write result. /// MONGOCXX_ABI_EXPORT_CDECL(v1::bulk_write::result) result() const; /// /// Return the number of documents that were deleted. /// MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) deleted_count() const; /// /// Compare equal when all supported fields compare equal. /// /// @{ friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator==(delete_one_result const& lhs, delete_one_result const& rhs); friend bool operator!=(delete_one_result const& lhs, delete_one_result const& rhs) { return !(lhs == rhs); } /// @} /// class internal; private: /* explicit(false) */ delete_one_result(void* impl); }; } // namespace v1 } // namespace mongocxx #include /// /// @file /// Provides @ref mongocxx::v1::delete_one_result. ///