35 ms·
Some frameworks provide automatically generated type-safe entities, query, and update capabilites, such as the Yesod Persistent framework [0]. For a smaller bu
by steven777400 11y ago
Some frameworks provide automatically generated type-safe entities, query, and update capabilites, such as the Yesod Persistent framework [0].
For a smaller but similarly safe approach, I reccomend Esqueleto.
[0] http://www.yesodweb.com/book/persistent http://www.yesodweb.com/book/persistent
[1] https://hackage.haskell.org/package/esqueleto https://hackage.haskell.org/package/esqueleto
- xnyhps 11y agoTo be precise, Esqueleto isn't a smaller alternative, it's a layer on top of Persistent that gives you a typed DSL for SQL. It's been pretty nice when I used it, most things that I wanted to do in SQL were easily expressed. Exotic SQL functions that weren't available are easily imported in a type-safe way. acid-state is a smaller, no-SQL alternative [1]. [1] https://hackage.haskell.org/package/acid-state https://hackage.haskell.org/package/acid-state
- steven777400 11y agoThank you. I was thinking of Persistent as part of a Yesod Web framework and Esqueleto as something independent, which was not correct.