96 struct deprecated_tag {};
320 std::unique_ptr<impl> _impl;
326#include <mongocxx/config/postlude.hpp>
Provides bsoncxx::v_noabi::array::view_or_value.
read_preference()
Constructs a new read_preference with read_mode set to k_primary.
A client connection to a MongoDB server.
Definition client.hpp:61
A MongoDB collection.
Definition collection.hpp:87
A MongoDB database.
Definition database.hpp:46
read_preference & mode(read_mode mode)
Sets a new mode for this read_preference.
read_preference & max_staleness(std::chrono::seconds max_staleness)
Sets the max staleness setting for this read_preference. Secondary servers with an estimated lag grea...
read_mode
Determines which members in a replica set are acceptable to read from.
Definition read_preference.hpp:63
@ k_nearest
Read from the node with the lowest latency irrespective of state.
Definition read_preference.hpp:87
@ k_primary
Only read from a primary node.
Definition read_preference.hpp:67
@ k_secondary_preferred
Prefer to read from secondary nodes.
Definition read_preference.hpp:82
@ k_secondary
Only read from secondary nodes.
Definition read_preference.hpp:77
@ k_primary_preferred
Prefer to read from a primary node.
Definition read_preference.hpp:72
read_preference()
Constructs a new read_preference with read_mode set to k_primary.
read_preference & hedge(bsoncxx::v_noabi::document::view_or_value hedge)
Sets the hedge document to be used for the read preference. Sharded clusters running MongoDB 4....
read_preference & tags(bsoncxx::v_noabi::document::view_or_value tag_set_list)
Sets or updates the tag set list for this read_preference.
A MongoDB Atlas Search Index.
Definition search_index_view.hpp:26
A MongoDB connection string URI.
Definition uri.hpp:43
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::collection.
Declares mongocxx::v_noabi::database.
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_DEPRECATED
Declares the associated entity as deprecated.
Definition export.hpp:25
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities describing APM events.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::read_preference.
Declares mongocxx::v_noabi::search_index_view.
Declares mongocxx::v_noabi::events::topology_description.
Declares mongocxx::v_noabi::options::transaction.
Provides mongocxx::v_noabi::options::transaction.
Declares mongocxx::v_noabi::uri.
Provides std::optional-related polyfills for library API usage.