Skip to content

Commit 2fd9652

Browse files
authored
v1: find_options (CXX-3237, CXX-3238) (#1532)
* CXX-3236 Fix type of "comment" field
1 parent c537620 commit 2fd9652

File tree

8 files changed

+1024
-259
lines changed

8 files changed

+1024
-259
lines changed

src/mongocxx/include/mongocxx/v1/find_options.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222

2323
#include <bsoncxx/v1/document/value-fwd.hpp>
2424
#include <bsoncxx/v1/document/view-fwd.hpp>
25+
#include <bsoncxx/v1/types/value-fwd.hpp>
26+
#include <bsoncxx/v1/types/view-fwd.hpp>
2527

2628
#include <mongocxx/v1/hint-fwd.hpp>
2729
#include <mongocxx/v1/read_preference-fwd.hpp>
2830

2931
#include <bsoncxx/v1/stdx/optional.hpp>
30-
#include <bsoncxx/v1/stdx/string_view.hpp>
3132

3233
#include <mongocxx/v1/config/export.hpp>
3334
#include <mongocxx/v1/cursor.hpp>
3435

3536
#include <chrono>
3637
#include <cstdint>
37-
#include <string>
3838

3939
namespace mongocxx {
4040
namespace v1 {
@@ -159,12 +159,12 @@ class find_options {
159159
///
160160
/// Set the "comment" field.
161161
///
162-
MONGOCXX_ABI_EXPORT_CDECL(find_options&) comment(std::string comment);
162+
MONGOCXX_ABI_EXPORT_CDECL(find_options&) comment(bsoncxx::v1::types::value comment);
163163

164164
///
165165
/// Return the current "comment" field.
166166
///
167-
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) comment() const;
167+
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) comment() const;
168168

169169
///
170170
/// Set the "cursorType" field.
@@ -315,6 +315,8 @@ class find_options {
315315
/// Return the current "sort" field.
316316
///
317317
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
318+
319+
class internal;
318320
};
319321

320322
} // namespace v1

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#pragma once
1616

17+
#include <mongocxx/v1/find_options-fwd.hpp> // IWYU pragma: export
18+
1719
#include <mongocxx/config/prelude.hpp>
1820

1921
namespace mongocxx {
@@ -29,7 +31,7 @@ class find;
2931
namespace mongocxx {
3032
namespace options {
3133

32-
using ::mongocxx::v_noabi::options::find;
34+
using v_noabi::options::find;
3335

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

0 commit comments

Comments
 (0)