MongoDB C++ Driver
mongocxx-3.6.2
|
22 #include <bsoncxx/document/view_or_value.hpp>
23 #include <bsoncxx/stdx/optional.hpp>
24 #include <mongocxx/options/transaction.hpp>
25 #include <mongocxx/stdx.hpp>
27 #include <mongocxx/config/prelude.hpp>
30 MONGOCXX_INLINE_NAMESPACE_BEGIN
38 class topology_description;
94 k_secondary_preferred,
200 stdx::optional<
bsoncxx::document::view> tags() const;
239 stdx::optional<std::chrono::seconds> max_staleness() const;
266 const stdx::optional<
bsoncxx::document::view> hedge() const;
272 friend options::transaction;
273 friend events::topology_description;
291 class MONGOCXX_PRIVATE impl;
293 MONGOCXX_PRIVATE
read_preference(std::unique_ptr<impl>&& implementation);
295 std::unique_ptr<impl> _impl;
298 MONGOCXX_INLINE_NAMESPACE_END
301 #include <mongocxx/config/postlude.hpp>
MONGOCXX_DEPRECATED read_preference(read_mode mode)
Constructs a new read_preference.
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
MONGOCXX_DEPRECATED read_preference(read_mode mode, bsoncxx::document::view_or_value tags)
Constructs a new read_preference with tags.
Class representing a client connection to MongoDB.
Definition: client.hpp:58
read_preference()
Constructs a new read_preference with read_mode set to k_primary.
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:62
Class representing a MongoDB connection string URI.
Definition: uri.hpp:43
Definition: read_preference.hpp:107
read_mode
Determines which members in a replica set are acceptable to read from.
Definition: read_preference.hpp:75
Class representing a MongoDB database.
Definition: database.hpp:43
read_preference(const read_preference &)
Copy constructs a read_preference.
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:81
read_preference & operator=(const read_preference &)
Copy assigns a read_preference.
read_preference(read_preference &&) noexcept
Move constructs a read_preference.