package tranzactio
- Alphabetic
- By Inheritance
- tranzactio
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type ConnectionSource = Service
- abstract class DatabaseModuleBase[Connection, Database <: ServiceOps[Connection]] extends ModuleOps[Connection, Database]
Template implementing the commodity methods for a Db module.
- trait DatabaseOps[Connection, R0] extends AnyRef
Operations for a Database, based on a few atomic operations.
Operations for a Database, based on a few atomic operations. Can be used both by the actual DB service, or by the DB component where a Database is required in the resulting ZIO.
- R0
Environment needed to run the operations.
- abstract class DatabaseServiceBase[Connection] extends ServiceOps[Connection]
Template implementing a default transactional mechanism, based on a ConnectionSource.
- sealed trait DbException extends Exception
All exceptions that may happen when working with the DB.
- case class ErrorStrategies(openConnection: ErrorStrategy, setAutoCommit: ErrorStrategy, commitConnection: ErrorStrategy, rollbackConnection: ErrorStrategy, closeConnection: ErrorStrategy) extends ErrorStrategiesRef with Product with Serializable
Contains one ErrorStrategy for each DB operation.
Contains one ErrorStrategy for each DB operation. Carries a few methods to apply changes to all methods.
- openConnection
Note that
openConnectionis a special case. Timeouts should not be handled in ZIO over this method, as that could lead to connection leaks. Therefore, thetimeoutmethod specifically ignoreopenConnection.
- sealed trait ErrorStrategiesRef extends AnyRef
How to handle issues in the various operations of the database.
How to handle issues in the various operations of the database. Note that this only applies to the operation performed when handling the connection, and not the execution of the requests!
- trait ErrorStrategy extends AnyRef
An ErrorStrategy defines how to handle one of the DB operations (openConnection, commit, etc.) It is typically created starting from the ErrorStrategy object, then applying timeout and retry.
- trait Wrapper extends AnyRef
A specific wrapper package for one specific library (e.g.
A specific wrapper package for one specific library (e.g. Doobie).
Value Members
- object ConnectionSource
A module able to provide and manage connections.
A module able to provide and manage connections. They typically come from a connection pool.
- object DatabaseOps
- object DbException extends Serializable
- object ErrorStrategies extends ErrorStrategies
The ErrorStrategies companion object is the starting point to define an ErrorStrategies, and therefore is defined as a set of empty strategies (no timeout and no retry).
- case object ErrorStrategiesParent extends ErrorStrategiesRef with Product with Serializable
Refer to the parent module, up to the default value in Tranzactio (which is Brutal).
- object ErrorStrategy extends ErrorStrategy
The ErrorStrategy companion object is the starting point to define an ErrorStrategy, and therefore is defined as an empty strategy (no timeout and no retry).