An implicit function that returns the thread-local session in a withSession block.
An implicit function that returns the thread-local session in a withSession block.
Load a database configuration through Typesafe Config.
Load a database configuration through Typesafe Config.
The following keys are supported:
- url
: JDBC URL (String, must be set)
- driver
: JDBC driver class to load (String, optional)
- user
: User name (String, optional)
- password
: Password (String, optional)
- properties
: Properties to pass to the driver (Map, optional)
The path in the configuration file for the database configuration (e.g. foo.bar
would find a database URL at config key foo.bar.url
)
The Config
object to read from. This defaults to the global app config
(e.g. in application.conf
at the root of the class path) if not specified.
An optional JDBC driver to call directly. If this is set to a non-null value,
the driver
key from the configuration is ignored. The default is to use the
standard lookup mechanism.
Create a Database based on a DataSource.
Create a Database that directly uses a Driver to open new connections.
Create a Database that directly uses a Driver to open new connections. This is needed to open a JDBC URL with a driver that was not loaded by the system ClassLoader.
Create a Database based on the JNDI name of a DataSource.
Create a Database that uses the DriverManager to open new connections.
Create a Database that uses the DriverManager to open new connections.
(databaseFactoryDef: StringAdd).self
(databaseFactoryDef: StringFormat).self
(databaseFactoryDef: ArrowAssoc[DatabaseFactoryDef]).x
(Since version 2.10.0) Use leftOfArrow
instead
(databaseFactoryDef: Ensuring[DatabaseFactoryDef]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Factory methods for creating
Database
instances.