persistBackend

This class helps to shorten the type signatures of user monadic code. If your monad has several connections, e.g., for main and audit databases, create run*Db function runAuditDb :: Action conn a -> m a
This helper module contains generic versions of PersistBackend functions
Class which allows the plucking of a BaseBackend backend from some larger type. For example, instance HasPersistBackend (SqlReadBackend, Int) where type BaseBackend (SqlReadBackend, Int) = SqlBackend persistBackend = unSqlReadBackend . fst
Class which witnesses that backend is essentially the same as BaseBackend backend. That is, they're isomorphic and backend is just some wrapper over BaseBackend backend.
This function is how we actually construct and tag a backend as having read or write capabilities. It should be used carefully and only when actually constructing a backend. Careless use allows us to accidentally run a write query against a read-only database.
Class which witnesses that backend is essentially the same as BaseBackend backend. That is, they're isomorphic and backend is just some wrapper over BaseBackend backend.