21 #include <bsoncxx/document/view.hpp>
22 #include <bsoncxx/string/view_or_value.hpp>
23 #include <mongocxx/read_concern.hpp>
24 #include <mongocxx/read_preference.hpp>
25 #include <mongocxx/write_concern.hpp>
27 #include <mongocxx/config/prelude.hpp>
30 MONGOCXX_INLINE_NAMESPACE_BEGIN
43 class MONGOCXX_API
uri {
51 static const std::string k_default_uri;
86 std::
string auth_mechanism() const;
93 std::
string auth_source() const;
100 std::vector<
host> hosts() const;
125 std::
string password() const;
146 std::
string replica_set() const;
155 MONGOCXX_DEPRECATED
bool ssl() const;
176 std::
string username() const;
190 stdx::optional<stdx::string_view> appname() const;
197 stdx::optional<
bsoncxx::document::view> auth_mechanism_properties() const;
205 std::vector<stdx::string_view> compressors() const;
212 stdx::optional<std::int32_t> connect_timeout_ms() const;
219 stdx::optional<
bool> direct_connection() const;
226 stdx::optional<std::int32_t> heartbeat_frequency_ms() const;
233 stdx::optional<std::int32_t> local_threshold_ms() const;
240 stdx::optional<std::int32_t> max_pool_size() const;
247 stdx::optional<
bool> retry_reads() const;
254 stdx::optional<
bool> retry_writes() const;
261 stdx::optional<std::int32_t> server_selection_timeout_ms() const;
268 stdx::optional<
bool> server_selection_try_once() const;
275 stdx::optional<std::int32_t> socket_timeout_ms() const;
282 stdx::optional<
bool> tls_allow_invalid_certificates() const;
289 stdx::optional<
bool> tls_allow_invalid_hostnames() const;
296 stdx::optional<stdx::string_view> tls_ca_file() const;
303 stdx::optional<stdx::string_view> tls_certificate_key_file() const;
310 stdx::optional<stdx::string_view> tls_certificate_key_file_password() const;
318 stdx::optional<
bool> tls_disable_certificate_revocation_check() const;
325 stdx::optional<
bool> tls_disable_ocsp_endpoint_check() const;
332 stdx::optional<
bool> tls_insecure() const;
339 stdx::optional<std::int32_t> wait_queue_timeout_ms() const;
346 stdx::optional<std::int32_t> zlib_compression_level() const;
352 class MONGOCXX_PRIVATE impl;
354 MONGOCXX_PRIVATE
uri(std::unique_ptr<impl>&& implementation);
356 std::unique_ptr<impl> _impl;
359 MONGOCXX_INLINE_NAMESPACE_END
362 #include <mongocxx/config/postlude.hpp>
Class representing a view-or-value variant type for strings.
Definition: view_or_value.hpp:36
Class representing a client connection to MongoDB.
Definition: client.hpp:58
Class representing a MongoDB database.
Definition: database.hpp:43
A pool of client objects associated with a MongoDB deployment.
Definition: pool.hpp:47
A class to represent the read concern.
Definition: read_concern.hpp:54
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
uri(uri &&) noexcept
Move constructs a uri.
uri(bsoncxx::string::view_or_value uri_string=k_default_uri)
Constructs a uri from an optional MongoDB URI string.
Class representing the server-side requirement for reporting the success of a write operation.
Definition: write_concern.hpp:56
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
stdx::string_view to_string(log_level level)
Returns a stringification of the given log level.