Atomically

oxygen.sql.Atomically
See theAtomically companion trait
object Atomically

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Atomically.type

Members list

Type members

Classlikes

final case class LiveDB(db: Database) extends Atomically

TLDR : Transaction(commit/rollback) -> Savepoint(commit/rollback) -> Savepoint(commit/rollback) -> ...

TLDR : Transaction(commit/rollback) -> Savepoint(commit/rollback) -> Savepoint(commit/rollback) -> ...

When executed outside any other atomically blocks, this will execute the provided effect within a transaction, and if it succeeds, commit, and if it fails, roll back.

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
Supertypes
trait Serializable
trait Product
trait Equals
trait Atomically
trait Impl
trait ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]
class Object
trait Matchable
class Any
Show all
object LiveDB

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
LiveDB.type
final class NoOp extends Atomically

Attributes

Companion
object
Supertypes
trait Atomically
trait Impl
trait ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]
class Object
trait Matchable
class Any
Show all
object NoOp

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
NoOp.type
final case class RollbackDB(db: Database) extends Atomically

TLDR : Transaction(always rollback) -> Savepoint(commit/rollback) -> Savepoint(commit/rollback) -> ...

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
Supertypes
trait Serializable
trait Product
trait Equals
trait Atomically
trait Impl
trait ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]
class Object
trait Matchable
class Any
Show all
object RollbackDB

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
RollbackDB.type

Value members

Concrete fields

val atomically: ZIOAspectAtLeastR[Atomically]