fun createClient(): MongoClient
(source)
Creates an instance based on a (single) mongodb node (localhost, default port).
Return
the mongo client
fun createClient(connectionString: String): MongoClient
(source)
Creates a Mongo instance.
connectionString
- the connection string
Return
the mongo client
fun createClient(connectionString: ConnectionString): MongoClient
(source)
Creates a Mongo described by a URI. If only one address is used it will only connect to that node, otherwise it will discover all nodes.
connectionString
- the connection uri
Return
the mongo client
fun createClient(settings: MongoClientSettings): MongoClient
(source)
Creates a Mongo described by a URI. If only one address is used it will only connect to that node, otherwise it will discover all nodes.
Return
the mongo client