kmongo / org.litote.kmongo / KMongo / createClient

createClient

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.

Parameters

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.

Parameters

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.

Parameters

settings - the settings

Return
the mongo client