Skip to main content

All Questions

Tagged with
5 votes
2 answers
2k views

Compose optional queries for for-comprehension in doobie?

I would like to run several queries in one transaction using a for-comprehension in doobie. Something like: def addImage(path:String) : ConnectionIO[Image] = { sql"INSERT INTO images(path) VALUES($...
janne's user avatar
  • 131
0 votes
1 answer
1k views

Transforming Doobie ConnectionIO[Option[Int]] without explicit match

I have a ConnectionIO[Option[Int]] and map over the Option to produce a ConnectionIO[Option[String]] with a query the Some[Int] otherwise keep the Nones. I was able to do this with aforcomprehension ...
Arne Claassen's user avatar