Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Replacer m a where
- tryParseQuery :: forall r. MemberWithError Replacer r => Query -> Sem r (Query, Set (Ref Table))
- interceptSqlReadTryParseRawQueries :: forall r a. Members [SqlRead, SqlParse, Log, Reader ExtraDependencies, Replacer] r => Sem r a -> Sem r a
- interceptSqlWriteTryParseRawQueries :: forall r a. Members [SqlWrite, Reader ExtraDependencies, Replacer] r => Sem r a -> Sem r a
- replacer :: Members [Replacer, Reader ExtraDependencies] r => Query -> (Query -> Sem r a) -> Sem r a
- interpretReplacer :: Members [SqlParse, Log] r => Replacer m a -> Sem r a
- interceptTryParseRawQueries :: Members [SqlRead, SqlParse, SqlWrite, Log, Reader ExtraDependencies] r => Sem r a -> Sem r a
Documentation
Instances
GShow (Replacer a :: Type -> Type) # | |
Defined in Napkin.Run.Effects.Interceptors.TryParseRawQueries gshowsPrec :: forall (a0 :: k). Int -> Replacer a a0 -> ShowS # | |
GEq (Replacer a :: Type -> Type) # | |
Eq (Replacer m a) # | |
Show (Replacer m a) # | |
type DefiningModule (Replacer :: k -> Type -> Type) # | |
Defined in Napkin.Run.Effects.Interceptors.TryParseRawQueries type DefiningModule (Replacer :: k -> Type -> Type) = "Napkin.Run.Effects.Interceptors.TryParseRawQueries" |
tryParseQuery :: forall r. MemberWithError Replacer r => Query -> Sem r (Query, Set (Ref Table)) #
interceptSqlReadTryParseRawQueries :: forall r a. Members [SqlRead, SqlParse, Log, Reader ExtraDependencies, Replacer] r => Sem r a -> Sem r a #
Parse top level QueryRaw
instances and replace them with 'Query.'
TODO: This can only handle top level raw queries. What if raw queries appear deep within non-raw queries? We'd need a monadic interleaving traversal to reach all such cases and parse them.
interceptSqlWriteTryParseRawQueries :: forall r a. Members [SqlWrite, Reader ExtraDependencies, Replacer] r => Sem r a -> Sem r a #