Safe Haskell | None |
---|---|
Language | GHC2024 |
Synopsis
- data Replacer (m :: k) a where
- tryParseQuery :: forall (r :: EffectRow). Member (Replacer :: (Type -> Type) -> Type -> Type) r => Query -> Sem r (Query, Set (Ref Table))
- interceptSqlReadTryParseRawQueries :: forall {k} (b :: k) (r :: EffectRow) a. Members '[SqlRead b :: (Type -> Type) -> Type -> Type, SqlParse :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, Replacer :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a
- interceptSqlWriteTryParseRawQueries :: forall b (r :: EffectRow) a. Members '[SqlWrite b :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, Replacer :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a
- replacer :: forall (r :: EffectRow) a. Members '[Replacer :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type] r => Query -> (Query -> Sem r a) -> Sem r a
- interpretReplacer :: forall {k} (r :: EffectRow) (m :: k) a. Members '[SqlParse :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type] r => Replacer m a -> Sem r a
- interceptTryParseRawQueries :: forall b (r :: EffectRow) a. Members '[SqlRead b :: (Type -> Type) -> Type -> Type, SqlParse :: (Type -> Type) -> Type -> Type, SqlWrite b :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a
Documentation
tryParseQuery :: forall (r :: EffectRow). Member (Replacer :: (Type -> Type) -> Type -> Type) r => Query -> Sem r (Query, Set (Ref Table)) #
interceptSqlReadTryParseRawQueries :: forall {k} (b :: k) (r :: EffectRow) a. Members '[SqlRead b :: (Type -> Type) -> Type -> Type, SqlParse :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, Replacer :: (Type -> Type) -> Type -> Type] 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 b (r :: EffectRow) a. Members '[SqlWrite b :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, Replacer :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #
replacer :: forall (r :: EffectRow) a. Members '[Replacer :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type] r => Query -> (Query -> Sem r a) -> Sem r a #
interpretReplacer :: forall {k} (r :: EffectRow) (m :: k) a. Members '[SqlParse :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type] r => Replacer m a -> Sem r a #
interceptTryParseRawQueries :: forall b (r :: EffectRow) a. Members '[SqlRead b :: (Type -> Type) -> Type -> Type, SqlParse :: (Type -> Type) -> Type -> Type, SqlWrite b :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #