MongoClients

object MongoClients

A factory for MongoClient instances.

Since

3.0

Functions

Link copied to clipboard
fun create(): MongoClient

Creates a new client with the default connection string "mongodb://localhost".

fun create(connectionString: ConnectionString): MongoClient
fun create(connectionString: String): MongoClient
fun create(connectionString: ConnectionString, mongoDriverInformation: MongoDriverInformation?): MongoClient

Create a new client with the given connection string.

fun create(settings: MongoClientSettings): MongoClient

Create a new client with the given client settings.

fun create(settings: MongoClientSettings, mongoDriverInformation: MongoDriverInformation?): MongoClient

Creates a new client with the given client settings.

Properties

Link copied to clipboard
val defaultCodecRegistry: CodecRegistry

Gets the default codec registry. It includes the following providers: