Skip to content

Instantly share code, notes, and snippets.

@martinlechner1
Created October 25, 2019 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinlechner1/e751342aa41ea21bc8b439f94ba670e9 to your computer and use it in GitHub Desktop.
Save martinlechner1/e751342aa41ea21bc8b439f94ba670e9 to your computer and use it in GitHub Desktop.
def queryProgram(xa: Transactor[IO]) =
sql"""SELECT your_fields FROM your_table"""
.query[YourModel]
.stream
.transact(xa)
.evalMap(d => IO(println(d)))
.compile
.drain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment