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 inline namespace v_noabi {
42 class MONGOCXX_API
uri {
51 static const std::string k_default_uri;
64 uri(bsoncxx::string::view_or_value uri_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;
204 stdx::optional<
bsoncxx::document::view> credentials();
211 stdx::optional<std::int32_t> srv_max_hosts() const;
219 std::vector<stdx::string_view> compressors() const;
226 stdx::optional<std::int32_t> connect_timeout_ms() const;
233 stdx::optional<
bool> direct_connection() const;
240 stdx::optional<std::int32_t> heartbeat_frequency_ms() const;
247 stdx::optional<std::int32_t> local_threshold_ms() const;
254 stdx::optional<std::int32_t> max_pool_size() const;
261 stdx::optional<
bool> retry_reads() const;
268 stdx::optional<
bool> retry_writes() const;
275 stdx::optional<std::int32_t> server_selection_timeout_ms() const;
282 stdx::optional<
bool> server_selection_try_once() const;
289 stdx::optional<std::int32_t> socket_timeout_ms() const;
296 stdx::optional<
bool> tls_allow_invalid_certificates() const;
303 stdx::optional<
bool> tls_allow_invalid_hostnames() const;
310 stdx::optional<stdx::string_view> tls_ca_file() const;
317 stdx::optional<stdx::string_view> tls_certificate_key_file() const;
324 stdx::optional<stdx::string_view> tls_certificate_key_file_password() const;
332 stdx::optional<
bool> tls_disable_certificate_revocation_check() const;
339 stdx::optional<
bool> tls_disable_ocsp_endpoint_check() const;
346 stdx::optional<
bool> tls_insecure() const;
353 stdx::optional<std::int32_t> wait_queue_timeout_ms() const;
360 stdx::optional<std::int32_t> zlib_compression_level() const;
366 class MONGOCXX_PRIVATE impl;
368 MONGOCXX_PRIVATE
uri(std::unique_ptr<impl>&& implementation);
370 std::unique_ptr<impl> _impl;
376 #include <mongocxx/config/postlude.hpp>
Class representing a client connection to MongoDB.
Definition: client.hpp:54
Class representing a MongoDB database.
Definition: database.hpp:44
A pool of client objects associated with a MongoDB deployment.
Definition: pool.hpp:46
A class to represent the read concern.
Definition: read_concern.hpp:57
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:67
Class representing a MongoDB connection string URI.
Definition: uri.hpp:42
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:59
The top-level namespace for bsoncxx library entities.
Definition: element.hpp:24
stdx::string_view to_string(log_level level)
Returns a stringification of the given log level.
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24
A host.
Definition: uri.hpp:45