78 bsoncxx::detail::enable_if_t<std::is_convertible<T,
bsoncxx::
v_noabi::
string::view_or_value>::value>* =
nullptr>
107 uri(
uri const& other) =
delete;
124 return std::move(_uri);
140 return std::string{_uri.auth_mechanism()};
149 return std::string{_uri.auth_source()};
167 return std::string{_uri.database()};
180 return _uri.options();
189 return std::string{_uri.password()};
216 return std::string{_uri.replica_set()};
245 return std::string{_uri.to_string()};
254 return std::string{_uri.username()};
272 return _uri.appname();
281 return _uri.auth_mechanism_properties();
297 return _uri.srv_max_hosts();
306 std::vector<bsoncxx::v_noabi::stdx::string_view>
compressors()
const {
307 return _uri.compressors();
316 return _uri.connect_timeout_ms();
325 return _uri.direct_connection();
334 return _uri.heartbeat_frequency_ms();
343 return _uri.local_threshold_ms();
352 return _uri.max_pool_size();
361 return _uri.retry_reads();
370 return _uri.retry_writes();
379 return _uri.server_selection_timeout_ms();
388 return _uri.server_selection_try_once();
406 return _uri.socket_timeout_ms();
415 return _uri.tls_allow_invalid_certificates();
424 return _uri.tls_allow_invalid_hostnames();
433 return _uri.tls_ca_file();
442 return _uri.tls_certificate_key_file();
451 return _uri.tls_certificate_key_file_password();
461 return _uri.tls_disable_certificate_revocation_check();
470 return _uri.tls_disable_ocsp_endpoint_check();
479 return _uri.tls_insecure();
488 return _uri.wait_queue_timeout_ms();
497 return _uri.zlib_compression_level();
507 return {std::move(v)};
A polyfill for std::optional<T>.
Definition optional.hpp:799
A read-only, non-owning view of a BSON document.
Definition view.hpp:40
A view-or-value variant type for strings.
Definition view_or_value.hpp:41
uri(bsoncxx::v_noabi::string::view_or_value uri_string)
Constructs a uri from the provided MongoDB URI string.
A MongoDB connection string.
Definition uri.hpp:96
Controls the consistency and isolation properties of data read from replica sets and sharded clusters...
Definition read_concern.hpp:54
read_concern()=default
Constructs a new read_concern with default acknowledge_level of k_server_default.
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:59
read_preference()=default
Constructs a new read_preference with read_mode set to k_primary.
A MongoDB connection string URI.
Definition uri.hpp:55
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::stdx::string_view > tls_ca_file() const
Returns the value of the option "tlsCAFile" if present in the uri.
Definition uri.hpp:432
bsoncxx::v_noabi::stdx::optional< bool > server_selection_try_once() const
Returns the value of the option "serverSelectionTryOnce" if present in the uri.
Definition uri.hpp:387
bsoncxx::v_noabi::stdx::optional< bool > tls_insecure() const
Returns the value of the option "tlsInsecure" if present in the uri.
Definition uri.hpp:478
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::stdx::string_view > tls_certificate_key_file() const
Returns the value of the option "tlsCertificateKeyFile" if present in the uri.
Definition uri.hpp:441
bool ssl() const
Returns the ssl parameter from the uri.
Definition uri.hpp:226
std::vector< host > hosts() const
Returns the hosts from the uri.
Definition uri.hpp:157
std::string auth_mechanism() const
Returns the authentication mechanism from the uri.
Definition uri.hpp:139
uri(v1::uri uri)
Construct with the mongocxx::v1 equivalent.
Definition uri.hpp:113
bsoncxx::v_noabi::stdx::optional< std::int32_t > zlib_compression_level() const
Returns the value of the option "zlibCompressionLevel" if present in the uri.
Definition uri.hpp:496
bsoncxx::v_noabi::stdx::optional< std::int32_t > max_pool_size() const
Returns the value of the option "maxPoolSize" if present in the uri.
Definition uri.hpp:351
v_noabi::read_concern read_concern() const
Returns the read concern from the uri.
Definition uri.hpp:197
bsoncxx::v_noabi::stdx::optional< std::int32_t > connect_timeout_ms() const
Returns the value of the option "connectTimeoutMS" if present in the uri.
Definition uri.hpp:315
void server_selection_try_once(bool val)
Sets the value of the option "serverSelectionTryOnce" in the uri.
uri(bsoncxx::v_noabi::string::view_or_value uri_string)
Constructs a uri from the provided MongoDB URI string.
bsoncxx::v_noabi::stdx::optional< std::int32_t > wait_queue_timeout_ms() const
Returns the value of the option "waitQueueTimeoutMS" if present in the uri.
Definition uri.hpp:487
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > auth_mechanism_properties() const
Returns the value of the option "authMechanismProperties" if present in the uri.
Definition uri.hpp:280
bsoncxx::v_noabi::stdx::optional< bool > tls_allow_invalid_certificates() const
Returns the value of the option "tlsAllowInvalidCertificates" if present in the uri.
Definition uri.hpp:414
std::string database() const
Returns the database from the uri.
Definition uri.hpp:166
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::stdx::string_view > appname() const
Returns the value of the option "appname" if present in the uri.
Definition uri.hpp:271
bool tls() const
Returns the tls parameter from the uri.
Definition uri.hpp:235
bsoncxx::v_noabi::stdx::optional< std::int32_t > local_threshold_ms() const
Returns the value of the option "localThresholdMS" if present in the uri.
Definition uri.hpp:342
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > credentials()
Returns the value of the option credentials if present in the uri.
std::string auth_source() const
Returns the authentication source from the uri.
Definition uri.hpp:148
std::string to_string() const
Returns the uri in a string format.
Definition uri.hpp:244
bsoncxx::v_noabi::stdx::optional< std::int32_t > server_selection_timeout_ms() const
Returns the value of the option "serverSelectionTimeoutMS" if present in the uri.
Definition uri.hpp:378
bsoncxx::v_noabi::stdx::optional< std::int32_t > heartbeat_frequency_ms() const
Returns the value of the option "heartbeatFrequencyMS" if present in the uri.
Definition uri.hpp:333
v_noabi::write_concern write_concern() const
Returns the write concern specified in the uri.
Definition uri.hpp:262
bsoncxx::v_noabi::document::view options() const
Returns other uri options.
Definition uri.hpp:179
static const std::string k_default_uri
The default URI string: "mongodb://localhost:27017".
Definition uri.hpp:65
bsoncxx::v_noabi::stdx::optional< bool > retry_writes() const
Returns the value of the option "retryWrites" if present in the uri.
Definition uri.hpp:369
bsoncxx::v_noabi::stdx::optional< bool > tls_allow_invalid_hostnames() const
Returns the value of the option "tlsAllowInvalidHostnames" if present in the uri.
Definition uri.hpp:423
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::stdx::string_view > tls_certificate_key_file_password() const
Returns the value of the option "tlsCertificateKeyFilePassword" if present in the uri.
Definition uri.hpp:450
std::vector< bsoncxx::v_noabi::stdx::string_view > compressors() const
Returns the list of compressors present in the uri or an empty list if "compressors" was not present ...
Definition uri.hpp:306
std::string username() const
Returns the supplied username from the uri.
Definition uri.hpp:253
uri()
Constructs a uri from the default MongoDB URI string: "mongodb://localhost:27017".
Definition uri.hpp:90
bsoncxx::v_noabi::stdx::optional< bool > tls_disable_certificate_revocation_check() const
Returns the value of the option "tlsDisableCertificateRevocationCheck" if present in the uri.
Definition uri.hpp:460
uri(uri &&other) noexcept=default
Move constructs a uri.
bsoncxx::v_noabi::stdx::optional< std::int32_t > srv_max_hosts() const
Returns the value of the option "srvMaxHosts" if present in the uri.
Definition uri.hpp:296
~uri()=default
Destroys a uri.
bsoncxx::v_noabi::stdx::optional< std::int32_t > socket_timeout_ms() const
Returns the value of the option "socketTimeoutMS" if present in the uri.
Definition uri.hpp:405
uri & operator=(uri &&other) noexcept=default
Move assigns a uri.
std::string password() const
Returns the password from the uri.
Definition uri.hpp:188
bsoncxx::v_noabi::stdx::optional< bool > direct_connection() const
Returns the value of the option "directConnection" if present in the uri.
Definition uri.hpp:324
std::string replica_set() const
Returns the replica set specified in the uri.
Definition uri.hpp:215
bsoncxx::v_noabi::stdx::optional< bool > retry_reads() const
Returns the value of the option "retryReads" if present in the uri.
Definition uri.hpp:360
v_noabi::read_preference read_preference() const
Returns the read preference from the uri.
Definition uri.hpp:206
bsoncxx::v_noabi::stdx::optional< bool > tls_disable_ocsp_endpoint_check() const
Returns the value of the option "tlsDisableOCSPEndpointCheck" if present in the uri.
Definition uri.hpp:469
The level of acknowledgment requested for write operations to a MongoDB server.
Definition write_concern.hpp:54
write_concern()=default
Constructs a new write_concern.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
#define MONGOCXX_ABI_EXPORT
Exports the associated entity as part of the ABI.
Definition export.hpp:15
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Provides bsoncxx::v_noabi::string::view_or_value.
A host identifier.
Definition uri.hpp:104
Provides mongocxx::v1::uri.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::pool.
Provides mongocxx::v_noabi::read_concern.
Provides mongocxx::v_noabi::read_preference.
Declares mongocxx::v_noabi::uri.
Provides mongocxx::v_noabi::write_concern.