mongoc_version (3) Linux Manual Page
Version_Checks – Conditional compilation based on mongoc version Colophon This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
Version_Checks – Conditional compilation based on mongoc version Colophon This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
mongoc_uri_unescape() – Unescapes an URI encoded string. For example, "%40" would become "@". Synopsis char * mongoc_uri_unescape (const char *escaped_string); Parameters escaped_string A utf8 encoded string. Description Unescapes an URI encoded string. For example, "%40" would become "@". Returns Returns a newly allocated string that should be freed with bson_free(3) \&. Colophon This page is…
mongoc_uri_t – mongoc_uri_t provides an abstraction on top of the MongoDB connection URI format. It provides standardized parsing as well as convenience methods for extracting useful information such as replica hosts or authorization information. Synopsis typedef struct _mongoc_uri_t mongoc_uri_t; Description mongoc_uri_t provides an abstraction on top of the MongoDB connection URI format. It provides standardized…
mongoc_uri_new_for_host_port() – Creates a new mongoc_uri_t based on the hostname and port provided. Synopsis mongoc_uri_t * mongoc_uri_new_for_host_port (const char *hostname, uint16_t port); Parameters hostname A string containing the hostname. port A uint16_t. Description Creates a new mongoc_uri_t based on the hostname and port provided. Returns Returns a newly allocated mongoc_uri_t that should be freed with…
mongoc_uri_new() – Parses a string containing a MongoDB style URI connection string. Synopsis mongoc_uri_t * mongoc_uri_new (const char *uri_string) BSON_GNUC_WARN_UNUSED_RESULT; Parameters uri_string A string containing a URI. Description Parses a string containing a MongoDB style URI connection string. Returns A newly allocated mongoc_uri_t if successful. Otherwise NULL \&. NOTE Failure to handle the result of…
mongoc_uri_get_write_concern() – Fetches a write concern that is owned by the URI instance. This write concern is configured based on URI parameters. Synopsis const mongoc_write_concern_t * mongoc_uri_get_write_concern (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a write concern that is owned by the URI instance. This write concern is configured based on URI…
mongoc_uri_get_username() – Fetches the username portion of a URI. Synopsis const char * mongoc_uri_get_username (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the username portion of a URI. Returns Returns a string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report any bugs at…
mongoc_uri_get_string() – Fetches the URI as a string. Synopsis const char * mongoc_uri_get_string (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the URI as a string. Returns Returns a string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
mongoc_uri_get_ssl() – Fetches a boolean indicating if SSL was specified for use in the URI. Synopsis bool mongoc_uri_get_ssl (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a boolean indicating if SSL was specified for use in the URI. Returns Returns a boolean, true indicating that SSL should be used. Colophon This page is…
mongoc_uri_get_replica_set() – Fetches the replicaSet parameter of an URI. Synopsis const char * mongoc_uri_get_replica_set (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the replicaSet parameter of an URI. Returns Returns a string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report any bugs at…
mongoc_uri_get_read_prefs_t() – Fetches a read preference that is owned by the URI instance. This read preference concern is configured based on URI parameters. Synopsis const mongoc_read_prefs_t * mongoc_uri_get_read_prefs_t (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a read preference that is owned by the URI instance. This read preference concern is configured based…
mongoc_uri_get_read_prefs() – Fetches a bson document containing read preference tag information from a URI. Note that this does not include the read preference mode. Synopsis const bson_t * mongoc_uri_get_read_prefs (const mongoc_uri_t *uri); Deprecated NOTE This function is deprecated and should not be used in new code. Please use mongoc_uri_get_read_prefs_t(3) instead. Parameters uri A mongoc_uri_t \&….
mongoc_uri_get_read_concern() – Fetches a read concern that is owned by the URI instance. This read concern is configured based on URI parameters. Synopsis const mongoc_read_concern_t * mongoc_uri_get_read_concern (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a read concern that is owned by the URI instance. This read concern is configured based on URI…
mongoc_uri_get_password() – Fetches the password portion of an URI. Synopsis const char * mongoc_uri_get_password (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the password portion of an URI. Returns A string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
mongoc_uri_get_options() – Fetches a bson document containing all of the options provided after the ? of a URI. Synopsis const bson_t * mongoc_uri_get_options (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a bson document containing all of the options provided after the ? of a URI. Returns A bson_t which should not be…
mongoc_uri_get_hosts() – Fetches a linked list of hosts that were defined in the URI (the comma-separated host section). Synopsis const mongoc_host_list_t * mongoc_uri_get_hosts (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches a linked list of hosts that were defined in the URI (the comma-separated host section). Returns A linked list of mongoc_host_list_t structures…
mongoc_uri_get_database() – Fetches the database portion of an URI if provided. This is the portion after the / but before the ?. Synopsis const char * mongoc_uri_get_database (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the database portion of an URI if provided. This is the portion after the / but before the…
mongoc_uri_get_auth_source() – Fetches the authSource parameter of an URI if provided. Synopsis const char * mongoc_uri_get_auth_source (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the authSource parameter of an URI if provided. Returns A string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report…
mongoc_uri_get_auth_mechanism() – Fetches the authMechanism parameter to an URI if provided. Synopsis const char * mongoc_uri_get_auth_mechanism (const mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Fetches the authMechanism parameter to an URI if provided. Returns A string which should not be modified or freed. Colophon This page is part of MongoDB C Driver. Please report…
mongoc_uri_destroy() – Frees all resources associated with a uri. Synopsis void mongoc_uri_destroy (mongoc_uri_t *uri); Parameters uri A mongoc_uri_t \&. Description Frees all resources associated with a uri. Colophon This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.