MongoClient.this

Initializes a MongoDB client using a URL.

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

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

  1. this(string host, ushort port)
  2. this(string url)
    class MongoClient
    package @safe
    this
    (
    string url
    )
  3. this(MongoClientSettings settings)

Throws

An exception if the URL cannot be parsed as a valid MongoDB URL.

Meta