polysemy-hasql-0.0.1.0: Polysemy effects for databases
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Hasql.Interpreter.Query

Documentation

interpretQuery :: forall result query proj table r. ResultShape proj result => Member (DbTable table !! DbError) r => Projection proj table -> QuerySchema query table -> InterpreterFor (Query query result !! DbError) r Source #

interpretQueryDd :: forall result query proj table r. MkTableSchema proj => MkTableSchema table => CheckedProjection proj table => CheckQuery query table => ResultShape (DdType proj) result => Member (DbTable (DdType table) !! DbError) r => Dd table -> Dd proj -> Dd query -> InterpreterFor (Query (DdType query) result !! DbError) r Source #

queryVia :: (q1 -> Sem (Stop DbError ': r) q2) -> (r2 -> Sem (Stop DbError ': r) r1) -> Sem ((Query q1 r1 !! DbError) ': r) a -> Sem ((Query q2 r2 !! DbError) ': r) a Source #

mapQuery :: (q1 -> Sem (Stop DbError ': r) q2) -> Sem ((Query q1 result !! DbError) ': r) a -> Sem ((Query q2 result !! DbError) ': r) a Source #