object MongoClient extends Serializable
- Alphabetic
- By Inheritance
- MongoClient
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- val DEFAULT_CODEC_REGISTRY: CodecRegistry
- def apply(clientSettings: MongoClientSettings, mongoDriverInformation: Option[MongoDriverInformation]): MongoClient
Create a MongoClient instance from the MongoClientSettings
Create a MongoClient instance from the MongoClientSettings
- clientSettings
MongoClientSettings to use for the MongoClient
- mongoDriverInformation
any driver information to associate with the MongoClient
- returns
MongoClient
- Since
2.3
- Note
the
mongoDriverInformation
is intended for driver and library authors to associate extra driver metadata with the connections.
- def apply(clientSettings: MongoClientSettings): MongoClient
Create a MongoClient instance from the MongoClientSettings
Create a MongoClient instance from the MongoClientSettings
- clientSettings
MongoClientSettings to use for the MongoClient
- returns
MongoClient
- Since
2.3
- def apply(uri: String, mongoDriverInformation: Option[MongoDriverInformation]): MongoClient
Create a MongoClient instance from a connection string uri
Create a MongoClient instance from a connection string uri
- uri
the connection string
- mongoDriverInformation
any driver information to associate with the MongoClient
- returns
MongoClient
- Note
the
mongoDriverInformation
is intended for driver and library authors to associate extra driver metadata with the connections.
- def apply(uri: String): MongoClient
Create a MongoClient instance from a connection string uri
Create a MongoClient instance from a connection string uri
- uri
the connection string
- returns
MongoClient
- def apply(): MongoClient
Create a default MongoClient at localhost:27017
Create a default MongoClient at localhost:27017
- returns
MongoClient
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: