MongoConnection

reactivemongo.api.MongoConnection$
See theMongoConnection companion class

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

final class URI[T]

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 Object
trait Matchable
class Any
final class URIParsingException extends Exception with NoStackTrace

Attributes

Graph
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class 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

Concrete fields

val DefaultHost: String