io.github.gaelrenoux.tranzactio.anorm

TranzactIO module for Anorm. Note that the 'Connection' also includes the Blocking module, as tzio also needs to provide the wrapper around the synchronous Anorm method.

Attributes

Members list

Type members

Classlikes

object Database extends DatabaseModuleBase[Connection, ServiceOps[Connection], DbContext], DatabaseModuleTestOps[Connection, DbContext]

Database for the Anorm wrapper

Database for the Anorm wrapper

Attributes

Supertypes
trait DatabaseModuleTestOps[Connection, DbContext]
class DatabaseModuleBase[Connection, ServiceOps[Connection], DbContext]
trait ModuleOps[Connection, ServiceOps[Connection]]
trait DatabaseOps[Connection, ServiceOps[Connection]]
class Object
trait Matchable
class Any
Show all
Self type
Database.type
object DatabaseT extends Companion[Connection, DbContext]

Attributes

Supertypes
trait Companion[Connection, DbContext]
class Object
trait Matchable
class Any
Self type
DatabaseT.type

Types

final override type Connection = Connection

The Connection that needs to be provided by the Database to run any Query.

The Connection that needs to be provided by the Database to run any Query.

Attributes

final override type Database = Service

The Database provides a connection (transactionally or otherwise).

The Database provides a connection (transactionally or otherwise).

Attributes

final override type DatabaseT[M] = DatabaseTBase[M, Connection]

Parameterized type for databases, allowing for multiple databases to be handled

Parameterized type for databases, allowing for multiple databases to be handled

Attributes

final override type DbContext = EmptyDbContext.type

Contextual information for the DB, its content depending on the underlying library.

Contextual information for the DB, its content depending on the underlying library.

Attributes

final override type Query[A] = Connection => A

The specific type used in the wrapped library to represent an SQL query.

The specific type used in the wrapped library to represent an SQL query.

Attributes

final override type TranzactIO[A] = ZIO[Connection, DbException, A]

The type wrapping a Query[A] in TranzactIO.

The type wrapping a Query[A] in TranzactIO.

Could be defined here (instead of separately on each module), but this confuses some IDEs (like IntelliJ). The error appears when one file imports e.g. doobie.TranzactIO, and the other doobie._: the two TranzactIOs are not considered to be the same type. By defining TranzactIO on each module, the error disappears.

Attributes

Value members

Concrete methods

final override def tzio[A](q: => () => A)(implicit trace: Trace): TranzactIO[A]

Wraps a library-specific query into a TranzactIO.

Wraps a library-specific query into a TranzactIO.

Attributes

Definition Classes
Wrapper