Last active
September 20, 2019 06:18
-
-
Save adamw/4536f0b6f910be323839e911eaa9905f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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