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 {
52 static const std::string k_default_uri;
87 std::
string auth_mechanism() const;
94 std::
string auth_source() const;
101 std::vector<
host> hosts() const;
126 std::
string password() const;
147 std::
string replica_set() const;
156 MONGOCXX_DEPRECATED
bool ssl() const;
177 std::
string username() const;
191 stdx::optional<stdx::string_view> appname() const;
198 stdx::optional<
bsoncxx::document::view> auth_mechanism_properties() const;
205 stdx::optional<
bsoncxx::document::view> credentials();
212 stdx::optional<std::int32_t> srv_max_hosts() const;
220 std::vector<stdx::string_view> compressors() const;
227 stdx::optional<std::int32_t> connect_timeout_ms() const;
234 stdx::optional<
bool> direct_connection() const;
241 stdx::optional<std::int32_t> heartbeat_frequency_ms() const;
248 stdx::optional<std::int32_t> local_threshold_ms() const;
255 stdx::optional<std::int32_t> max_pool_size() const;
262 stdx::optional<
bool> retry_reads() const;
269 stdx::optional<
bool> retry_writes() const;
276 stdx::optional<std::int32_t> server_selection_timeout_ms() const;
283 stdx::optional<
bool> server_selection_try_once() const;
290 stdx::optional<std::int32_t> socket_timeout_ms() const;
297 stdx::optional<
bool> tls_allow_invalid_certificates() const;
304 stdx::optional<
bool> tls_allow_invalid_hostnames() const;
311 stdx::optional<stdx::string_view> tls_ca_file() const;
318 stdx::optional<stdx::string_view> tls_certificate_key_file() const;
325 stdx::optional<stdx::string_view> tls_certificate_key_file_password() const;
333 stdx::optional<
bool> tls_disable_certificate_revocation_check() const;
340 stdx::optional<
bool> tls_disable_ocsp_endpoint_check() const;
347 stdx::optional<
bool> tls_insecure() const;
354 stdx::optional<std::int32_t> wait_queue_timeout_ms() const;
361 stdx::optional<std::int32_t> zlib_compression_level() const;
367 class MONGOCXX_PRIVATE impl;
369 MONGOCXX_PRIVATE
uri(std::unique_ptr<impl>&& implementation);
371 std::unique_ptr<impl> _impl;
374 MONGOCXX_INLINE_NAMESPACE_END
377 #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:44
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:63
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.
A host.
Definition: uri.hpp:46