Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- MongoConnection.type
Members list
Type members
Classlikes
Attributes
- T
the type for the database name
- authenticate
the authenticate information (see MongoConnectionOptions.authenticationMechanism)
- db
the name of the database
- hosts
the host and port for the servers of the MongoDB replica set
- ignoredOptions
the options ignored from the parsed URI
- options
the connection options
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- trait NoStackTraceclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass Any
Types
An URI parsed from the configuration, with an optional database name.
An URI parsed from the configuration, with an optional database name.
Attributes
An URI parsed from the configuration, with a defined database name.
An URI parsed from the configuration, with a defined database name.
Attributes
Value members
Concrete methods
Parses a connection URI from its string representation.
Parses a connection URI from its string representation.
import scala.concurrent.{ ExecutionContext, Future }
import reactivemongo.api.{ AsyncDriver, MongoConnection }
def connectFromUri(drv: AsyncDriver, uri: String)(
implicit ec: ExecutionContext): Future[MongoConnection] = for {
parsedUri <- MongoConnection.fromString(uri)
con <- drv.connect(parsedUri)
} yield con
Attributes
- uri
the connection URI
Parses a connection URI from its string representation, with a required DB name.
Parses a connection URI from its string representation, with a required DB name.
import scala.concurrent.{ ExecutionContext, Future }
import reactivemongo.api.MongoConnection
def uriWithDB(uri: String)(
implicit ec: ExecutionContext): Future[MongoConnection.ParsedURIWithDB] =
MongoConnection.fromStringWithDB(uri)
Attributes
- uri
the connection URI