QuillZioExt
implicit
class QuillZioExt[T, R <: Has[_]](qzio: ZIO[Has[Connection] & R, Throwable, T])(implicit tag: Tag[R])
class Object
trait Matchable
class Any
Value members
Concrete methods
Change Has[Connection]
of a QIO to Has[DataSource with Closeable]
by providing a DataSourceLayer.live
instance
which will grab a connection from the data-source, perform the QIO operation, and the immediately release the connection.
This is used for data-sources that have pooled connections e.g. Hikari.
Change Has[Connection]
of a QIO to Has[DataSource with Closeable]
by providing a DataSourceLayer.live
instance
which will grab a connection from the data-source, perform the QIO operation, and the immediately release the connection.
This is used for data-sources that have pooled connections e.g. Hikari.
def ds: DataSource with Closeable = ...
run(query[Person]).onDataSource.provide(Has(ds))