Stability | experimental |
---|---|
Maintainer | Alp Mestanogullari <alp@zalora.com> |
Safe Haskell | Safe-Inferred |
A Context
type for holding a function
that will use some context to execute
something analoguous to a database operation.
This is equivalent to holding something like:
withConnection someConnection
where you have previously set up someConnection
by specifying a
connection string or something like that. This lets us support
any kind of backend (even an in-memory Map in an IORef), and
most interestingly, we can use just raw connections or a connection
pool, this approach really covers a lot of situations while keeping
everything quite simple.