napkin-0.5.10
Safe HaskellNone
LanguageHaskell2010

Napkin.Run.Effects.Interpreters.SqlRead

Synopsis

Documentation

type SqlReadIO m bk a tr = (MonadQueryStats m, Monad m, Katip m, MonadCatch m, Command InsertIntoQuery tr bk, Command CheckTableExists Bool bk, Command GetRelationSchema (Fields Field) 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 tr. (SqlReadIO m bk a tr, Members [Embed m, FatalError] r) => BackendConn bk -> Sem (SqlRead ': r) a -> Sem r a #