sealed abstract class Transactor[M[_]] extends AnyRef
A thin wrapper around a source of database connections, an interpreter, and a strategy for
running programs, parameterized over a target monad M
and an arbitrary wrapped value A
.
Given a stream or program in ConnectionIO
or a program in Kleisli
, a Transactor
can
discharge the doobie machinery and yield an effectful stream or program in M
.
- M
a target effect type; typically
IO
- Self Type
- Transactor[M]
- Source
- transactor.scala
- Grouped
- Alphabetic
- By Inheritance
- Transactor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
abstract
type
A
An arbitrary value that will be handed back to
connect
*
Abstract Value Members
-
abstract
def
connect: (A) ⇒ Resource[M, Connection]
A program in
M
that can provide a database connection, given the kernel * -
abstract
def
interpret: Interpreter[M]
A natural transformation for interpreting
ConnectionIO
* -
abstract
def
kernel: A
An arbitrary value, meaningful to the instance *
-
abstract
def
strategy: Strategy
A
Strategy
for running a program on a connection *
Concrete 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( ... ) @native()
-
def
configure[B](f: (A) ⇒ M[B]): M[B]
Construct a program to perform arbitrary configuration on the kernel value (changing the timeout on a connection pool, for example).
Construct a program to perform arbitrary configuration on the kernel value (changing the timeout on a connection pool, for example). This can be the basis for constructing a configuration language for a specific kernel type
A
, whose operations can be added to compatibleTransactor
s via implicit conversion. -
def
copy(kernel0: A = self.kernel, connect0: (A) ⇒ Resource[M, Connection] = self.connect, interpret0: Interpreter[M] = self.interpret, strategy0: Strategy = self.strategy): Aux[M, A]
- Annotations
- @SuppressWarnings()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exec(implicit ev: Bracket[M, Throwable], D: Defer[M]): ~>[[γ$4$]Kleisli[M, Connection, γ$4$], M]
Natural transformation that provides a connection and binds through a
Kleisli
program using the givenStrategy
, yielding an independent program inM
. -
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapK[M0[_]](fk: ~>[M, M0])(implicit D: Defer[M0], A: Applicative[M0]): Aux[M0, A]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rawExec(implicit ev: Bracket[M, Throwable]): ~>[[γ$1$]Kleisli[M, Connection, γ$1$], M]
Natural transformation equivalent to
exec
that does not use the providedStrategy
and instead directly binds theConnection
provided byconnect
.Natural transformation equivalent to
exec
that does not use the providedStrategy
and instead directly binds theConnection
provided byconnect
. This can be useful in cases where transactional handling is unsupported or undesired. -
def
rawTrans(implicit ev: Bracket[M, Throwable]): ~>[free.connection.ConnectionIO, M]
Natural transformation equivalent to
trans
that does not use the providedStrategy
and instead directly binds theConnection
provided byconnect
.Natural transformation equivalent to
trans
that does not use the providedStrategy
and instead directly binds theConnection
provided byconnect
. This can be useful in cases where transactional handling is unsupported or undesired. - def rawTransP[T](implicit ev: Monad[M]): ~>[[β$9$]Stream[[A]Free[ConnectionOp, A], β$9$], [β$10$]Stream[M, β$10$]]
- def rawTransPK[I](implicit ev: Monad[M]): ~>[[β$21$]Stream[[γ$19$]Kleisli[[A]Free[ConnectionOp, A], I, γ$19$], β$21$], [β$22$]Stream[[γ$20$]Kleisli[M, I, γ$20$], β$22$]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trans(implicit ev: Bracket[M, Throwable]): ~>[free.connection.ConnectionIO, M]
Natural transformation that provides a connection and binds through a
ConnectionIO
program interpreted via the given interpreter, using the givenStrategy
, yielding an independent program inM
.Natural transformation that provides a connection and binds through a
ConnectionIO
program interpreted via the given interpreter, using the givenStrategy
, yielding an independent program inM
. This is the most common way to run a doobie program. - def transP(implicit ev: Monad[M]): ~>[[β$14$]Stream[[A]Free[ConnectionOp, A], β$14$], [β$15$]Stream[M, β$15$]]
- def transPK[I](implicit ev: Monad[M]): ~>[[β$30$]Stream[[γ$28$]Kleisli[[A]Free[ConnectionOp, A], I, γ$28$], β$30$], [β$31$]Stream[[γ$29$]Kleisli[M, I, γ$29$], β$31$]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
yolo(implicit ev1: Sync[M]): Yolo[M]
Construct a Yolo for REPL experimentation.