table of contents
MONGOC_URI_NEW(3) | Library Functions Manual | MONGOC_URI_NEW(3) |
NAME¶
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 NULLNOTE
Failure to handle the result of this function is a
programming error.
EXAMPLES¶
Examples of some valid MongoDB connection strings can be seen below.mongodb://localhost/?replicaSet=myreplset
mongodb://myuser:mypass@localhost/
mongodb://kerberosuser%40EXAMPLE.COM@example.com/?authMechanism=GSSAPI
mongodb://10.0.0.1:27017,10.0.0.1:27018,[::1]:27019/?ssl=true
COLOPHON¶
This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.2016‐10‐12 | MongoDB C Driver |