rthoth / slick

My slick extension.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My slick extensions

This is my first Slick extension.

Reactive Streams

If you need to run a simple Stream of DBIActions you can do this:

import com.github.rthoth.slick._
import org.reactivestreams.Publisher
import slick.jdbc.H2Profile.api._

val db = Database.forURL("...")
val publisher: Publisher[DBIOAction[_, NoStream, Effect]] =  ...

db.run(publisher) // it has invoked implicit com.github.rthoth.slick.publisherToAction(publisher)

// if you need a transaction?

db.run(publisherToAction(publisher).transactionally)

Ok, that's it.

About

My slick extension.

License:GNU General Public License v3.0


Languages

Language:Scala 100.0%