object DBIOAction
- Source
- DBIOAction.scala
- Alphabetic
- By Inheritance
- DBIOAction
- 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 failed(t: Throwable): DBIOAction[Nothing, NoStream, Effect]
Create a DBIOAction that always fails.
- def fold[T, E <: Effect](actions: Seq[DBIOAction[T, NoStream, E]], zero: T)(f: (T, T) => T): DBIOAction[T, NoStream, E]
Create a DBIOAction that runs some other actions in sequence and combines their results with the given function.
- def from[R](fa: Future[R]): DBIOAction[R, NoStream, Effect]
Lift a
scala.concurrent.Futureinto a DBIOAction.Lift a
scala.concurrent.Futureinto a DBIOAction.This overload is provided for interop with Play / Akka / Pekko code that produces
Futurevalues. TheFutureis wrapped incats.effect.IO.fromFutureso that it is executed on the CE3 compute pool and its cancellation semantics are respected.def callExternalService(): Future[String] = ??? val action: DBIO[String] = DBIO.from(callExternalService())
For lifting a CE3 effect use
DBIO.from[F[_], R](fa: F[R])directly.Warning — do not call
db.runinside the lifted Future. See theDBIO.from[F[_], R]overload for a full explanation of why nesteddb.runcalls can cause a deadlock. - def from[F[_], R](fa: F[R]): DBIOAction[R, NoStream, Effect]
Lift any
F[R]effect (e.g.Lift any
F[R]effect (e.g.cats.effect.IO[R]) into a DBIOAction.The effect is executed on the CE3 compute pool, outside of any JDBC blocking context. Use this to interleave effectful computations (logging, UUID generation, etc.) within a DBIO action chain without needing a separate
flatMapoverF.val action: DBIO[String] = for { id <- DBIO.from(IO(java.util.UUID.randomUUID().toString)) _ <- users += User(id, "Alice") } yield id
Warning — do not call
db.runinside the lifted effect.db.runacquires a connection-pool permit for the full duration of the outer action. Callingdb.runagain from withinDBIO.fromattempts to acquire a second permit from the same bounded pool. If all permits are already held by outer actions, every innerdb.runwill block forever, deadlocking the application. Compose database work as a single DBIO chain instead:// Wrong — nested db.run can deadlock: DBIO.from(db.run(otherAction)) // Correct — compose as DBIO: otherAction.flatMap(result => nextAction(result))
- 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
- def liftF[F[_], R](fa: F[R]): DBIOAction[R, NoStream, Effect]
Alias for
from.Alias for
from.Warning — do not call
db.runinside the lifted effect. SeeDBIO.from[F[_], R]for a full explanation of why nesteddb.runcalls can cause a deadlock. - 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 seq[E <: Effect](actions: DBIOAction[_, NoStream, E]*): DBIOAction[Unit, NoStream, E]
A simpler version of
sequencethat takes a number of DBIOActions with any return type as varargs and returns a DBIOAction that performs the individual actions in sequence, returning()in the end. - def sequence[R, M[+_] <: IterableOnce[_], E <: Effect](in: M[DBIOAction[R, NoStream, E]])(implicit cbf: Factory[R, M[R]]): DBIOAction[M[R], NoStream, E]
Transform a
TraversableOnce[ DBIO[R] ]into aDBIO[ TraversableOnce[R] ]. - def sequenceOption[R, E <: Effect](in: Option[DBIOAction[R, NoStream, E]]): DBIOAction[Option[R], NoStream, E]
Transform a
Option[ DBIO[R] ]into aDBIO[ Option[R] ]. - def successful[R](v: R): DBIOAction[R, NoStream, Effect]
Lift a constant value to a DBIOAction.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[A, B, M[+X] <: IterableOnce[X]](in: M[A])(f: (A) => DBIO[B])(implicit cbf: Factory[B, M[B]]): DBIO[M[B]]
Transforms an
IterableOnce[A]into aDBIO[IterableOnce[B]]using the provided functionA => DBIO[B]. - def unit: DBIOAction[Unit, NoStream, Effect]
A no-op DBIOAction.
A no-op DBIOAction. A cached value of
DBIOAction.successful(())to avoid allocations. - 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...