vibe.d beta banner
get vibe.d
0.7.30

Function parseMongoDBUrl

Parses the given string as a mongodb URL. The URL must be in the form documented at http://www.mongodb.org/display/DOCS/Connections which is:

Prototype

bool parseMongoDBUrl(
  out MongoClientSettings cfg,
  string url
);

mongodb

//[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

Returns

true if the URL was successfully parsed. False if the URL can not be parsed.

If the URL is successfully parsed the MongoClientSettings instance will contain the parsed config. If the URL is not successfully parsed the information in the MongoClientSettings instance may be incomplete and should not be used.

Authors

Sönke Ludwig

Copyright

© 2012-2016 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.