From 55d7d4484a544819837a5f907fcf7d7956e69cc6 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Mon, 17 Nov 2025 09:26:51 -0600 Subject: [PATCH] v1: return_document (CXX-3237, CXX-3238) --- .../options/find_one_common_options-fwd.hpp | 9 +++++-- .../options/find_one_common_options.hpp | 26 ++++--------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options-fwd.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options-fwd.hpp index d729010386..9fc831f986 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options-fwd.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options-fwd.hpp @@ -14,13 +14,15 @@ #pragma once +#include + #include namespace mongocxx { namespace v_noabi { namespace options { -enum class return_document; +using v1::return_document; } // namespace options } // namespace v_noabi @@ -29,7 +31,7 @@ enum class return_document; namespace mongocxx { namespace options { -using ::mongocxx::v_noabi::options::return_document; +using v1::return_document; } // namespace options } // namespace mongocxx @@ -40,3 +42,6 @@ using ::mongocxx::v_noabi::options::return_document; /// @file /// Declares @ref mongocxx::v_noabi::options::return_document. /// +/// @par Includes +/// - @ref mongocxx/v1/return_document-fwd.hpp +/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options.hpp index 0714158e6c..8111b74c7a 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options.hpp @@ -16,30 +16,14 @@ #include // IWYU pragma: export -#include - -namespace mongocxx { -namespace v_noabi { -namespace options { - -/// -/// Indicates whether a `findOneAndModify` operation should return the old or new version of the -/// modified document. -/// -enum class return_document { - /// Return the version of the document before the modification takes place. - k_before, - /// Return the version of the document after the modification takes place. - k_after, -}; - -} // namespace options -} // namespace v_noabi -} // namespace mongocxx +// -#include +#include // IWYU pragma: export /// /// @file /// Provides @ref mongocxx::v_noabi::options::return_document. /// +/// @par Includes +/// - @ref mongocxx/v1/return_document.hpp +///