io.github.gaelrenoux.tranzactio.doobie

TranzactIO module for Doobie.

Attributes

Members list

Type members

Classlikes

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

Database for the Doobie wrapper

Database for the Doobie 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
case class DbContext(logHandler: LogHandler[Task])

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

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DbContext

Attributes

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

Types

final override type Connection = Transactor[Task]

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 Query[A] = ConnectionIO[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

final type TranzactIOStream[A] = ZStream[Connection, DbException, A]

Value members

Concrete methods

final override def tzio[A](q: => ConnectionIO[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
final def tzioStream[A](q: => Stream[Query, A], queueSize: => Int)(implicit trace: Trace): TranzactIOStream[A]

Converts a Doobie stream to a ZStream. Note that you can provide a queue size, default value is the same as in ZIO.

Converts a Doobie stream to a ZStream. Note that you can provide a queue size, default value is the same as in ZIO.

Attributes