247 return !(lhs == rhs);
A BSON document.
Definition value.hpp:46
A polyfill for std::optional<T>.
Definition optional.hpp:799
A polyfill for std::string_view.
Definition string_view.hpp:412
write_concern & acknowledge_level(level v)
Set the "w" field as to acknowledgement level.
std::chrono::milliseconds timeout() const
Return the current "wtimeout" field.
friend bool operator!=(write_concern const &lhs, write_concern const &rhs)
Compare equal when all supported fields compare equal.
Definition write_concern.hpp:246
bsoncxx::v1::stdx::optional< bool > journal() const
Return the current "j" field.
level acknowledge_level() const
Return the current "w" field as an acknowledgement level.
write_concern & journal(bool j)
Set the "j" field.
write_concern(write_concern &&other) noexcept
Move constructor.
write_concern()
Default initialization.
bsoncxx::v1::document::value to_document() const
Return this write concern option as a document.
write_concern & tag(bsoncxx::v1::stdx::string_view v)
Set the "w" field to a custom write concern name.
write_concern & majority()
Equivalent to this->acknowledge_level(level::k_majority).
Definition write_concern.hpp:163
write_concern & timeout(std::chrono::milliseconds v)
Set the "wtimeout" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > tag() const
Return the current "w" value as a custom write concern name.
friend bool operator==(write_concern const &lhs, write_concern const &rhs)
Compare equal when all supported fields compare equal.
bool is_acknowledged() const
Return true when this write concern requires acknowledgement.
bsoncxx::v1::stdx::optional< std::int32_t > nodes() const
Return the current "w" field as an integer.
write_concern & majority(std::chrono::milliseconds v)
Equivalent to this->acknowledge_level(k_majority).timeout(timeout).
Definition write_concern.hpp:170
~write_concern()
Destroy this object.
write_concern & nodes(std::int32_t v)
Set the "w" field to an integer.
level
The write concern level.
Definition write_concern.hpp:62
@ k_unacknowledged
"w": 0
Definition write_concern.hpp:82
@ k_unknown
An unknown (unsupported) write concern level.
Definition write_concern.hpp:94
@ k_tag
"w": "<custom write concern name>"
Definition write_concern.hpp:77
@ k_acknowledged
"w": 1
Definition write_concern.hpp:87
@ k_majority
"w": "majority"
Definition write_concern.hpp:72
@ k_default
Default MongoDB Read Concerns/Write Concerns (MongoDB Manual)
Definition write_concern.hpp:67
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Declares bsoncxx::v1::document::value.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Declares mongocxx::v1::write_concern.