JdbcDataSource

slick.jdbc.JdbcDataSource
See theJdbcDataSource companion object
trait JdbcDataSource extends Closeable

A JdbcDataSource provides a way to create a Connection object for a database. It is similar to a javax.sql.DataSource but simpler. Unlike JdbcBackend.JdbcDatabaseDef it is not a part of the backend cake. This trait defines the SPI for 3rd-party connection pool support.

Attributes

Companion:
object
Source:
JdbcDataSource.scala
Graph
Supertypes
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def close(): Unit

If this object represents a connection pool managed directly by Slick, close it. Otherwise no action is taken.

If this object represents a connection pool managed directly by Slick, close it. Otherwise no action is taken.

Attributes

Source:
JdbcDataSource.scala
def createConnection(): Connection

Create a new Connection or get one from the pool

Create a new Connection or get one from the pool

Attributes

Source:
JdbcDataSource.scala

Abstract fields

val maxConnections: Option[Int]

If this object represents a connection pool with a limited size, return the maximum pool size. Otherwise return None. This is required to prevent deadlocks when scheduling database actions.

If this object represents a connection pool with a limited size, return the maximum pool size. Otherwise return None. This is required to prevent deadlocks when scheduling database actions.

Attributes

Source:
JdbcDataSource.scala