LiveDB

oxygen.sql.Atomically.LiveDB
See theLiveDB companion object
final case class LiveDB(db: Database) extends Atomically

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
Graph
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

Members list

Value members

Concrete methods

override def atomically[R, E, A](effect: ZIO[R, E, A]): ZIO[R, E, A]

Attributes

Definition Classes
override def atomicallyScoped: URIO[Scope, Unit]

Attributes

Definition Classes

Inherited methods

def >>>[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1](that: ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]): ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]

Attributes

Inherited from:
ZIOAspect
def @@[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1](that: ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]): ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]

Returns a new aspect that represents the sequential composition of this aspect with the specified one.

Returns a new aspect that represents the sequential composition of this aspect with the specified one.

Attributes

Inherited from:
ZIOAspect
def andThen[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1](that: ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]): ZIOAspect[LowerR1, UpperR1, LowerE1, UpperE1, LowerA1, UpperA1]

Attributes

Inherited from:
ZIOAspect
final override def apply[R, E, A](effect: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]

Attributes

Definition Classes
Atomically -> Impl -> ZIOAspect
Inherited from:
Atomically
def flip: ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]

Returns a new aspect that flips the behavior it applies to error and success channels. If the old aspect affected success values in some way, then the new aspect will affect error values in the same way.

Returns a new aspect that flips the behavior it applies to error and success channels. If the old aspect affected success values in some way, then the new aspect will affect error values in the same way.

Attributes

Inherited from:
ZIOAspect
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product