Skip to content

Commit 5d1142b

Browse files
authored
v1: return_document (CXX-3237, CXX-3238) (#1506)
1 parent 29185e4 commit 5d1142b

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options-fwd.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
#pragma once
1616

17+
#include <mongocxx/v1/return_document-fwd.hpp>
18+
1719
#include <mongocxx/config/prelude.hpp>
1820

1921
namespace mongocxx {
2022
namespace v_noabi {
2123
namespace options {
2224

23-
enum class return_document;
25+
using v1::return_document;
2426

2527
} // namespace options
2628
} // namespace v_noabi
@@ -29,7 +31,7 @@ enum class return_document;
2931
namespace mongocxx {
3032
namespace options {
3133

32-
using ::mongocxx::v_noabi::options::return_document;
34+
using v1::return_document;
3335

3436
} // namespace options
3537
} // namespace mongocxx
@@ -40,3 +42,6 @@ using ::mongocxx::v_noabi::options::return_document;
4042
/// @file
4143
/// Declares @ref mongocxx::v_noabi::options::return_document.
4244
///
45+
/// @par Includes
46+
/// - @ref mongocxx/v1/return_document-fwd.hpp
47+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/options/find_one_common_options.hpp

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,14 @@
1616

1717
#include <mongocxx/options/find_one_common_options-fwd.hpp> // IWYU pragma: export
1818

19-
#include <mongocxx/config/prelude.hpp>
20-
21-
namespace mongocxx {
22-
namespace v_noabi {
23-
namespace options {
24-
25-
///
26-
/// Indicates whether a `findOneAndModify` operation should return the old or new version of the
27-
/// modified document.
28-
///
29-
enum class return_document {
30-
/// Return the version of the document before the modification takes place.
31-
k_before,
32-
/// Return the version of the document after the modification takes place.
33-
k_after,
34-
};
35-
36-
} // namespace options
37-
} // namespace v_noabi
38-
} // namespace mongocxx
19+
//
3920

40-
#include <mongocxx/config/postlude.hpp>
21+
#include <mongocxx/v1/return_document.hpp> // IWYU pragma: export
4122

4223
///
4324
/// @file
4425
/// Provides @ref mongocxx::v_noabi::options::return_document.
4526
///
27+
/// @par Includes
28+
/// - @ref mongocxx/v1/return_document.hpp
29+
///

0 commit comments

Comments
 (0)