Skip to content

Instantly share code, notes, and snippets.

@adamw

adamw/t9.scala

Created Sep 19, 2019
Embed
What would you like to do?
val httpCall: IO[String] = IO("Zoe")
val queryFromHttpCall: IO[ConnectionIO[Int]] =
httpCall.map { name =>
sql"SELECT COUNT(*) FROM persons WHERE name = $name".query[Int].unique
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment