ScalaConsultants / zio-slick-interop

Slick interop for ZIO
MIT License
38 stars 9 forks source link

Add an overload of ZIO.fromDBIO accepting a function taking an execution context #30

Closed remiguittaut closed 3 years ago

remiguittaut commented 3 years ago

Some DBIOs need an execution context to be constructed, for example when flatMapping several DBIO actions. It is very simple to add an extra overload taking a function with an ExecutionContext as input argument.

It spares the developer from adding implicit val ec: ExecutionContext = Runtome.default.platform.executor.asEC in blocks.