Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type SqlReadIO m bk a = (MonadQueryStats m, Monad m, Katip m, MonadCatch m, Command InsertIntoQuery () bk, Command CheckTableExists Bool bk, Command GetRelationSchema [BackendSchemaField bk] bk, HasBackendSchemaField bk, Backend bk, RenderSql Query bk)
- runSqlReadIO :: forall m bk r a. (SqlReadIO m bk a, Members [Embed m, FatalError] r) => BackendConn bk -> Sem (SqlRead bk ': r) a -> Sem r a
Documentation
type SqlReadIO m bk a = (MonadQueryStats m, Monad m, Katip m, MonadCatch m, Command InsertIntoQuery () bk, Command CheckTableExists Bool bk, Command GetRelationSchema [BackendSchemaField bk] bk, HasBackendSchemaField bk, Backend bk, RenderSql Query bk) #
A multi-backend interpreter that uses our previous Command
typeclass machinery to dispatch to different backends. This is an
easy way to write a single interpreter that works for all backends,
given that we already have the typeclass based machinery in place.
Alternatively, we could get rid of the command system and implement either individual interpreters for each backend, or pass in backend-specific capability dictionaries/records or something.
runSqlReadIO :: forall m bk r a. (SqlReadIO m bk a, Members [Embed m, FatalError] r) => BackendConn bk -> Sem (SqlRead bk ': r) a -> Sem r a #