oxygen.sql.Atomically.RollbackDB
See theRollbackDB companion object
final case class RollbackDB(db: Database) extends Atomically
TLDR : Transaction(always rollback) -> Savepoint(commit/rollback) -> Savepoint(commit/rollback) -> ...
When executed outside any other atomically
blocks, this will execute the provided effect within a transaction, and no matter the result, will roll back the transaction. Useful for testing.
When executed within another atomically
block or blocks (multiple levels deep), this will execute the provided effect within a savepoint, and if it success, releases the savepoint, and if it fails, roll back the savepoint.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Atomicallytrait Impltrait ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]class Objecttrait Matchableclass Any
Members list
In this article