DbTx

zio.blocks.sql.DbTx
See theDbTx companion trait
object DbTx

Attributes

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

Members list

Value members

Concrete methods

def transactNested[A](f: DbTx ?=> A)(using outer: DbTx): A

Nested transaction via savepoint using an ambient DbTx.

Nested transaction via savepoint using an ambient DbTx.

Example:

transactor.transact {
 sql"INSERT INTO t VALUES (1)".update
 summon[DbTx].transact {
   sql"INSERT INTO t VALUES (2)".update
 }
}

Also available as transactNested for call sites that prefer a using parameter over an extension receiver.

Attributes

Source
DbTx.scala