Skip to content

Instantly share code, notes, and snippets.

@adamw adamw/t10.scala
Last active Sep 20, 2019

Embed
What would you like to do?
val insertEventQuery: ConnectionIO[Int] =
sql"INSERT INTO events(msg) VALUES('made a http call')".update.run
val result: IO[Int] = queryFromHttpCall
.map(countQuery => insertEventQuery >> countQuery)
.flatMap(_.transact(transactor))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.