An URI parsed from the configuration, with an optional database name.
An URI parsed from the configuration, with a defined database name.
the type for the database name
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
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)
the connection URI