Await.result
with all DB calls, to wait at that point until they complete, for example: Await.result(db.run(insertEffect), Duration.Inf) ?
--
---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/cf691203-11af-4036-9e66-f8006efe683b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def coffeesPrice():Future[Double] = {getPrices().map { prices =>prices.sum()}}def getPrices():Future[Seq[Double]] = {
val q = coffees.map(_.price)val action = q.result
db.run(action)}
Often it's appropriate to return a DBIO[T] rather than a Future[T], then the code is decoupled from the database instance.
--
---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/CAO26FW1-ROK2WNP8HnNfyh8Fp01j%3DBHNPojtftcn3PSpE%2B0Mbw%40mail.gmail.com.