object DatabaseConfig extends DatabaseConfig
- Source
- DatabaseConfig.scala
- Alphabetic
- By Inheritance
- DatabaseConfig
- DatabaseConfig
- DatabaseConfig
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def forConfig[P <: BasicProfile](path: String, config: Config = ConfigFactory.load(), classLoader: ClassLoader = ClassLoaderUtil.defaultClassLoader)(implicit arg0: ClassTag[P]): BasicDatabaseConfig[P]
Load a database configuration through Typesafe Config, reading the profile from it:
profileis the fully qualified name of the profile object, e.g.Load a database configuration through Typesafe Config, reading the profile from it:
profileis the fully qualified name of the profile object, e.g."slick.jdbc.PostgresProfile$". See forProfileConfig for the other configuration keys.- path
The path in the configuration file for the database configuration, or an empty string for the top level of the
Configobject.- config
The
Configobject to read from. This defaults to the global app config (e.g. inapplication.confat the root of the class path).
- Definition Classes
- DatabaseConfig
- def forDataSource[P <: JdbcProfile](profile: P, ds: DataSource, keepAliveConnection: Boolean = false): JdbcDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forDriver[P <: JdbcProfile](profile: P, driver: Driver, url: String, user: String = null, password: String = null, prop: Properties = null, classLoader: ClassLoader = slick.util.ClassLoaderUtil.defaultClassLoader): JdbcDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forName[P <: JdbcProfile](profile: P, name: String): JdbcDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forProfileConfig[P <: BasicProfile](profile: P, path: String, config: Config = ConfigFactory.load(), classLoader: ClassLoader = ClassLoaderUtil.defaultClassLoader): BasicDatabaseConfig[P]
Load a database configuration for the given profile through Typesafe Config.
Load a database configuration for the given profile through Typesafe Config.
The following keys go directly in the configuration at
pathor in itsdbsub-section:connectionPool(String, optional, default:HikariCP): The connection pool implementation.HikariCPrequires the "slick-hikaricp" dependency. Usedisabledto use a DataSource or the JDBC driver directly, or the fully qualified name of a third-party slick.jdbc.JdbcDataSourceFactory object.url(String): The JDBC URL.driver(String, optional): The fully qualified name of the JDBC driver class.userandpassword(String, optional): The credentials.dataSourceClass(String, optional): The name of ajavax.sql.DataSourceclass provided by the JDBC driver, to use instead ofurlanddriver.properties(Map, optional): Properties for the JDBC driver, or for the DataSource whendataSourceClassis set.keepAliveConnection(Boolean, optional, default: false, only without a connection pool): Keep one connection open as long as the database is open.isolation(String, optional, e.g.READ_COMMITTED),readOnly(Boolean, optional) andcatalog(String, optional): Settings for each new connection.maxConnections(Int, optional, default: 20): The maximum number of concurrent JDBC connections. With HikariCP this is also the maximum pool size.maxInflightActions(Int, optional, default: twicemaxConnections),queueSize(Int, optional, default: 1000),inflightAdmissionTimeoutandconnectionAcquireTimeout(Duration, optional): The limits on concurrently running and waiting database actions, see slick.ControlsConfig.
With HikariCP,
minConnections,connectionTimeout,idleTimeout,maxLifetime,connectionTestQuery,poolName,registerMbeansand the other HikariCP settings are passed on to the pool under their HikariCP names.- profile
The profile to use.
- path
The path in the configuration file for the database configuration, or an empty string for the top level of the
Configobject.- config
The
Configobject to read from. This defaults to the global app config (e.g. inapplication.confat the root of the class path).
- Definition Classes
- DatabaseConfig
- def forProfileURI[P <: BasicProfile](profile: P, uri: URI, classLoader: ClassLoader = ClassLoaderUtil.defaultClassLoader): BasicDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forSource[P <: JdbcProfile](profile: P, source: JdbcDataSource): JdbcDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forURI[P <: BasicProfile](uri: URI, classLoader: ClassLoader = ClassLoaderUtil.defaultClassLoader)(implicit arg0: ClassTag[P]): BasicDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- def forURL[P <: JdbcProfile](profile: P, url: String, user: String = null, password: String = null, prop: Properties = null, driver: String = null, keepAliveConnection: Boolean = false, classLoader: ClassLoader = slick.util.ClassLoaderUtil.defaultClassLoader): JdbcDatabaseConfig[P]
- Definition Classes
- DatabaseConfig
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def splitURI(uri: URI): (String, String)
- Attributes
- protected
- Definition Classes
- DatabaseConfig
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)

edit this text on github
Scala Language-Integrated Connection Kit
This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.
Further documentation for Slick can be found on the documentation pages.
To the slick package list...