Class

play.api.db

DefaultDatabase

Related Doc: package db

Permalink

abstract class DefaultDatabase extends Database

Default implementation of the database API. Provides driver registration and connection methods.

Source
Databases.scala
Linear Supertypes
Database, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DefaultDatabase
  2. Database
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultDatabase(name: String, configuration: Config, environment: Environment)

    Permalink

Abstract Value Members

  1. abstract def closeDataSource(dataSource: DataSource): Unit

    Permalink
  2. abstract def createDataSource(): DataSource

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. lazy val dataSource: DataSource

    Permalink

    The underlying JDBC data source for this database.

    The underlying JDBC data source for this database.

    Definition Classes
    DefaultDatabaseDatabase
  7. val databaseConfig: DatabaseConfig

    Permalink
  8. def deregisterDriver(): Unit

    Permalink
  9. lazy val driver: Option[Driver]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getConnection(autocommit: Boolean): Connection

    Permalink

    Get a JDBC connection from the underlying data source.

    Get a JDBC connection from the underlying data source.

    Don't forget to release the connection at some point by calling close().

    autocommit

    determines whether to autocommit the connection

    returns

    a JDBC connection

    Definition Classes
    DefaultDatabaseDatabase
  15. def getConnection(): Connection

    Permalink

    Get a JDBC connection from the underlying data source.

    Get a JDBC connection from the underlying data source. Autocommit is enabled by default.

    Don't forget to release the connection at some point by calling close().

    returns

    a JDBC connection

    Definition Classes
    DefaultDatabaseDatabase
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. val name: String

    Permalink

    The configuration name for this database.

    The configuration name for this database.

    Definition Classes
    DefaultDatabaseDatabase
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def shutdown(): Unit

    Permalink

    Shutdown this database, closing the underlying data source.

    Shutdown this database, closing the underlying data source.

    Definition Classes
    DefaultDatabaseDatabase
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. lazy val url: String

    Permalink

    The JDBC connection URL this database, i.e.

    The JDBC connection URL this database, i.e. jdbc:... Normally retrieved via a connection.

    Definition Classes
    DefaultDatabaseDatabase
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def withConnection[A](autocommit: Boolean)(block: (Connection) ⇒ A): A

    Permalink

    Execute a block of code, providing a JDBC connection.

    Execute a block of code, providing a JDBC connection. The connection and all created statements are automatically released.

    autocommit

    determines whether to autocommit the connection

    block

    code to execute

    returns

    the result of the code block

    Definition Classes
    DefaultDatabaseDatabase
  30. def withConnection[A](block: (Connection) ⇒ A): A

    Permalink

    Execute a block of code, providing a JDBC connection.

    Execute a block of code, providing a JDBC connection. The connection and all created statements are automatically released.

    block

    code to execute

    returns

    the result of the code block

    Definition Classes
    DefaultDatabaseDatabase
  31. def withTransaction[A](block: (Connection) ⇒ A): A

    Permalink

    Execute a block of code in the scope of a JDBC transaction.

    Execute a block of code in the scope of a JDBC transaction. The connection and all created statements are automatically released. The transaction is automatically committed, unless an exception occurs.

    block

    code to execute

    returns

    the result of the code block

    Definition Classes
    DefaultDatabaseDatabase

Inherited from Database

Inherited from AnyRef

Inherited from Any

Ungrouped