A set of hooks that may be used to alter the behaviour
of runSqlPoolWithExtensibleHooks in a backwards-compatible
fashion.
Modulepersistent-2.18.1.0Haskell2010
Database.Persist.SqlBackend.SqlPoolHooks
Synopsis
- data SqlPoolHooks
- value defaultSqlPoolHooks
- value getAlterBackend
- value modifyAlterBackend
- value setAlterBackend
- value getRunBefore
- value modifyRunBefore
- value setRunBefore
- value getRunAfter
- value modifyRunAfter
- value setRunAfter
- value getRunOnException
- Packagepersistent-2.18.1.0
- Exports12
- LanguageHaskell2010
- LicenceMIT
- SourceSqlPoolHooks.hs
value
defaultSqlPoolHooks :: (MonadIO m, BackendCompatible SqlBackend backend) => SqlPoolHooks m backendLifecycle hooks that may be altered to extend SQL pool behavior in a backwards compatible fashion.
By default, the hooks have the following semantics:
alterBackend has no effect
runBefore begins a transaction
runAfter commits the current transaction
runOnException rolls back the current transaction