1414
1515#pragma once
1616
17- #include < mongocxx/v1/transaction -fwd.hpp> // IWYU pragma: export
17+ #include < mongocxx/v1/transaction_options -fwd.hpp> // IWYU pragma: export
1818
1919//
2020
@@ -47,7 +47,7 @@ namespace v1 {
4747// /
4848// / @attention This feature is experimental! It is not ready for use!
4949// /
50- class transaction {
50+ class transaction_options {
5151 private:
5252 void * _impl; // mongoc_transaction_opt_t
5353
@@ -57,56 +57,60 @@ class transaction {
5757 // /
5858 // / @warning Invalidates all associated views.
5959 // /
60- MONGOCXX_ABI_EXPORT_CDECL () ~transaction ();
60+ MONGOCXX_ABI_EXPORT_CDECL () ~transaction_options ();
6161
6262 // /
6363 // / Move constructor.
6464 // /
6565 // / @par Postconditions:
6666 // / - `other` is in an assign-or-destroy-only state.
6767 // /
68- MONGOCXX_ABI_EXPORT_CDECL () transaction(transaction && other) noexcept ;
68+ MONGOCXX_ABI_EXPORT_CDECL () transaction_options(transaction_options && other) noexcept ;
6969
7070 // /
7171 // / Move assignment.
7272 // /
7373 // / @par Postconditions:
7474 // / - `other` is in an assign-or-destroy-only state.
7575 // /
76- MONGOCXX_ABI_EXPORT_CDECL (transaction &) operator =(transaction && other) noexcept ;
76+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options &) operator =(transaction_options && other) noexcept ;
7777
7878 // /
7979 // / Copy construction.
8080 // /
81- MONGOCXX_ABI_EXPORT_CDECL () transaction(transaction const & other);
81+ MONGOCXX_ABI_EXPORT_CDECL () transaction_options(transaction_options const & other);
8282
8383 // /
8484 // / Copy assignment.
8585 // /
86- MONGOCXX_ABI_EXPORT_CDECL (transaction &) operator =(transaction const & other);
86+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options &) operator =(transaction_options const & other);
8787
8888 // /
8989 // / Default initialization.
9090 // /
9191 // / @par Postconditions:
9292 // / - All supported fields are "unset" or zero-initialized.
9393 // /
94- MONGOCXX_ABI_EXPORT_CDECL () transaction ();
94+ MONGOCXX_ABI_EXPORT_CDECL () transaction_options ();
9595
9696 // /
9797 // / Set the "maxCommitTimeMS" field.
9898 // /
99- MONGOCXX_ABI_EXPORT_CDECL (transaction&) max_commit_time_ms(std::chrono::milliseconds v);
99+ // / @note `0` is equivalent to "unset".
100+ // /
101+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options&) max_commit_time_ms(std::chrono::milliseconds v);
100102
101103 // /
102104 // / Return the current "maxCommitTimeMS" field.
103105 // /
106+ // / @note `0` is equivalent to "unset".
107+ // /
104108 MONGOCXX_ABI_EXPORT_CDECL (bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_commit_time_ms() const ;
105109
106110 // /
107111 // / Set the "readConcern" field.
108112 // /
109- MONGOCXX_ABI_EXPORT_CDECL (transaction &) read_concern(v1::read_concern const & v);
113+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options &) read_concern(v1::read_concern const & v);
110114
111115 // /
112116 // / Return the current "readConcern" field.
@@ -116,7 +120,7 @@ class transaction {
116120 // /
117121 // / Set the "readPreference" field.
118122 // /
119- MONGOCXX_ABI_EXPORT_CDECL (transaction &) read_preference(v1::read_preference const & v);
123+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options &) read_preference(v1::read_preference const & v);
120124
121125 // /
122126 // / Return the current "readPreference" field.
@@ -126,12 +130,17 @@ class transaction {
126130 // /
127131 // / Set the "writeConcern" field.
128132 // /
129- MONGOCXX_ABI_EXPORT_CDECL (transaction &) write_concern(v1::write_concern const & v);
133+ MONGOCXX_ABI_EXPORT_CDECL (transaction_options &) write_concern(v1::write_concern const & v);
130134
131135 // /
132136 // / Return the current "writeConcern" field.
133137 // /
134138 MONGOCXX_ABI_EXPORT_CDECL (bsoncxx::v1::stdx::optional<v1::write_concern>) write_concern() const ;
139+
140+ class internal ;
141+
142+ private:
143+ /* explicit(false) */ transaction_options(void * impl);
135144};
136145
137146} // namespace v1
@@ -141,5 +150,5 @@ class transaction {
141150
142151// /
143152// / @file
144- // / Provides @ref mongocxx::v1::transaction .
153+ // / Provides @ref mongocxx::v1::transaction_options .
145154// /
0 commit comments