I'm creating an akka-stream using Alpakka and the Slick module but I'm stuck in a type mismatch problem.
One branch is about getting the total number of invoices in their table:
def getTotal(implicit session: SlickSession) = {
import session.profile.api._
val query = TableQuery[Tables.Invoice].length.result
Slick.source(query)
}
But the end line doesn't compile because Alpakka is expecting a StreamingDBIO
but I'm providing a FixedSqlAction[Int,slick.dbio.NoStream,slick.dbio.Effect.Read]
.
How can I move from the non-streaming result to the streaming one?