DefaultDBApi

play.api.db.DefaultDBApi
See theDefaultDBApi companion object
class DefaultDBApi(configuration: Map[String, Config], defaultConnectionPool: ConnectionPool, environment: Environment, injector: Injector) extends DBApi

Default implementation of the DB API.

Attributes

Companion
object
Graph
Supertypes
trait DBApi
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def database(name: String): Database

Get database with given configuration name.

Get database with given configuration name.

Value parameters

name

the configuration name of the database

Attributes

All configured databases.

All configured databases.

Attributes

def initialize(logInitialization: Boolean): Unit

Try to initialize all the configured databases. This ensures that the configurations will be checked, but the application initialization will not be affected if one of the databases is offline.

Try to initialize all the configured databases. This ensures that the configurations will be checked, but the application initialization will not be affected if one of the databases is offline.

Value parameters

logInitialization

if we need to log all the database initialization.

Attributes

def shutdown(): Unit

Shutdown all databases, releasing resources.

Shutdown all databases, releasing resources.

Attributes

Deprecated methods

def connect(logConnection: Boolean): Unit

Try to connect to all data sources.

Try to connect to all data sources.

Attributes

Deprecated
true