Attributes
- Companion
- trait
- Source
- ConnectionProvider.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConnectionProvider.type
Members list
Type members
Classlikes
Attributes
- Source
- ConnectionProvider.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Construct a Provider
that wraps an existing Connection
. Closing the connection is the responsibility of the caller.
Construct a Provider
that wraps an existing Connection
. Closing the connection is the responsibility of the caller.
Value parameters
- connection
-
a raw JDBC
Connection
to wrap - logHandler
-
Handler for outputting logs of process execution using connections.
Attributes
- Source
- ConnectionProvider.scala
Construct a constructor of Provider[F]
for some D <: DataSource
When calling this constructor you should explicitly supply the effect type M e.g. ConnectionProvider.fromDataSource[IO](myDataSource, connectEC)
Construct a constructor of Provider[F]
for some D <: DataSource
When calling this constructor you should explicitly supply the effect type M e.g. ConnectionProvider.fromDataSource[IO](myDataSource, connectEC)
Value parameters
- connectEC
-
Execution context dedicated to database connection.
- dataSource
-
A data source that manages connection information to MySQL.
- logHandler
-
Handler for outputting logs of process execution using connections.
Attributes
- Source
- ConnectionProvider.scala
Module of constructors for Provider
that use the JDBC DriverManager
to allocate connections. Note that DriverManager
is unbounded and will happily allocate new connections until server resources are exhausted. It is usually preferable to use DataSourceTransactor
with an underlying bounded connection pool. Blocking operations on DriverProvider
are executed on an unbounded cached daemon thread pool by default, so you are also at risk of exhausting system threads. TL;DR this is fine for console apps but don't use it for a web application.
Module of constructors for Provider
that use the JDBC DriverManager
to allocate connections. Note that DriverManager
is unbounded and will happily allocate new connections until server resources are exhausted. It is usually preferable to use DataSourceTransactor
with an underlying bounded connection pool. Blocking operations on DriverProvider
are executed on an unbounded cached daemon thread pool by default, so you are also at risk of exhausting system threads. TL;DR this is fine for console apps but don't use it for a web application.
Attributes
- Source
- ConnectionProvider.scala