Transactor

doobie.util.transactor.Transactor
See theTransactor companion class
object Transactor

Attributes

Companion
class
Source
transactor.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Transactor.type

Members list

Grouped members

Constructors

Construct a Transactor that wraps an existing java.sql.Connection. Closing the connection is the responsibility of the caller.

Construct a Transactor that wraps an existing java.sql.Connection. Closing the connection is the responsibility of the caller.

Attributes

Source
transactor.scala

Construct a constructor of Transactor[M, D] for some D <: DataSource by partial application of M, which cannot be inferred in general.

Construct a constructor of Transactor[M, D] for some D <: DataSource by partial application of M, which cannot be inferred in general.

Attributes

Source
transactor.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Module of constructors for Transactor that use the JDBC java.sql.DriverManager to allocate connections. Note that java.sql.DriverManager is unbounded and will happily allocate new connections until server resources are exhausted. It is usually preferable to use a Transactor backed by a javax.sql.DataSource with an underlying bounded connection pool (as with H2Transactor and HikariTransactor for instance). Blocking operations 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 Transactor that use the JDBC java.sql.DriverManager to allocate connections. Note that java.sql.DriverManager is unbounded and will happily allocate new connections until server resources are exhausted. It is usually preferable to use a Transactor backed by a javax.sql.DataSource with an underlying bounded connection pool (as with H2Transactor and HikariTransactor for instance). Blocking operations 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
transactor.scala

Lenses

def after[M[_]]: Lens[Transactor[M], ConnectionIO[Unit]]

Attributes

Source
transactor.scala
def always[M[_]]: Lens[Transactor[M], ConnectionIO[Unit]]

Attributes

Source
transactor.scala
def before[M[_]]: Lens[Transactor[M], ConnectionIO[Unit]]

Attributes

Source
transactor.scala
def connect[M[_], A]: Lens[Aux[M, A], A => Resource[M, Connection]]

Attributes

Source
transactor.scala
def interpret[M[_]]: Lens[Transactor[M], Interpreter[M]]

Attributes

Source
transactor.scala
def kernel[M[_], A]: Lens[Aux[M, A], A]

Attributes

Source
transactor.scala
def oops[M[_]]: Lens[Transactor[M], ConnectionIO[Unit]]

Attributes

Source
transactor.scala
def strategy[M[_]]: Lens[Transactor[M], Strategy]

Attributes

Source
transactor.scala

Type members

Classlikes

Attributes

Source
transactor.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Source
transactor.scala
Supertypes
class Object
trait Matchable
class Any

Types

type Aux[M[_], A0] = Transactor[M] { type A = A0; }

Attributes

Source
transactor.scala

Value members

Concrete methods

def apply[M[_], A0](kernel0: A0, connect0: A0 => Resource[M, Connection], interpret0: Interpreter[M], strategy0: Strategy): Aux[M, A0]

Attributes

Source
transactor.scala