21 #include <bsoncxx/document/view_or_value.hpp>
22 #include <bsoncxx/stdx/optional.hpp>
23 #include <mongocxx/stdx.hpp>
25 #include <mongocxx/config/prelude.hpp>
28 MONGOCXX_INLINE_NAMESPACE_BEGIN
76 k_primary_preferred = 0x05,
86 k_secondary_preferred = 0x06,
145 void mode(read_mode mode);
152 read_mode mode() const;
160 void tags(
bsoncxx::document::view_or_value tags);
167 stdx::optional<
bsoncxx::document::view> tags() const;
174 friend MONGOCXX_API
bool MONGOCXX_CALL
177 class MONGOCXX_PRIVATE impl;
179 MONGOCXX_PRIVATE read_preference(
std::unique_ptr<impl>&& implementation);
181 std::unique_ptr<impl> _impl;
184 MONGOCXX_INLINE_NAMESPACE_END
187 #include <mongocxx/config/postlude.hpp>
Class representing a MongoDB connection string URI.
Definition: uri.hpp:40
Definition: bulk_write.hpp:22
Definition: error_code.hpp:69
Class representing a client connection to MongoDB.
Definition: client.hpp:49
Class representing a MongoDB database.
Definition: database.hpp:43
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:54
read_mode
Determines which members in a replica set are acceptable to read from.
Definition: read_preference.hpp:67
Definition: element.hpp:24
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:74