https://tpolecat.github.io/doobie/docs/17-Quill.html
That's by far the best DB access layer I've ever worked with.