22#include <bsoncxx/document/value.hpp>
23#include <bsoncxx/stdx/optional.hpp>
24#include <bsoncxx/stdx/string_view.hpp>
25#include <mongocxx/options/transaction.hpp>
26#include <mongocxx/stdx.hpp>
28#include <mongocxx/config/prelude.hpp>
31MONGOCXX_INLINE_NAMESPACE_BEGIN
62 enum class level { k_default, k_majority, k_tag, k_unacknowledged, k_acknowledged };
102 void journal(
bool journal);
119 void nodes(std::int32_t confirm_from);
143 void acknowledge_level(
level confirm_level);
155 void majority(std::chrono::milliseconds timeout);
166 void tag(stdx::string_view tag);
178 void timeout(std::chrono::milliseconds timeout);
185 bool journal() const;
197 stdx::optional<std::int32_t> nodes() const;
213 stdx::optional<std::
string> tag() const;
220 bool majority() const;
227 std::chrono::milliseconds timeout() const;
234 bool is_acknowledged() const;
250 friend
mongocxx::options::transaction;
266 class MONGOCXX_PRIVATE impl;
268 MONGOCXX_PRIVATE
write_concern(std::unique_ptr<impl>&& implementation);
270 std::unique_ptr<impl> _impl;
273MONGOCXX_INLINE_NAMESPACE_END
276#include <mongocxx/config/postlude.hpp>
Class representing a batch of write operations that can be sent to the server as a group.
Definition: bulk_write.hpp:43
Class representing a client connection to MongoDB.
Definition: client.hpp:58
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:83
Class representing a MongoDB database.
Definition: database.hpp:43
Class representing a MongoDB connection string URI.
Definition: uri.hpp:43
Class representing the server-side requirement for reporting the success of a write operation.
Definition: write_concern.hpp:56
level
A class to represent the special case values for write_concern::nodes.
Definition: write_concern.hpp:62
write_concern()
Constructs a new write_concern.
write_concern(const write_concern &)
Copy constructs a write_concern.
write_concern & operator=(const write_concern &)
Copy assigns a write_concern.
write_concern(write_concern &&) noexcept
Move constructs a write_concern.
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24