napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

Napkin.Run.Effects.Interceptors.DiscoverDependencies

Synopsis

Documentation

interceptSqlReadDiscoverDependencies :: forall {k} (b :: k) (r :: EffectRow) a. Members '[Output Dependencies :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenDependencies) :: (Type -> Type) -> Type -> Type, SqlRead b :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #

Find all dependencies used in the given program. This incorporates both hidden and forcefully added dependencies in its report-out, and so it can be used for resolving dependencies in Spec.

TODO. This interceptor should probably get an Assertion dependence so that it can emit ValidationFailure when encountering table names with an asterisk in them but without a fully qualified xdep that matches the pattern. So we can warn user that they need to provide the dependency. Plus any other validations that should be performed during this operation.

interceptAnnotateWriteDiscoverDependencies :: forall {k} (b :: k) (r :: EffectRow) a. Members '[Output Dependencies :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenDependencies) :: (Type -> Type) -> Type -> Type, AnnotateWrite b :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #

interceptAnnotateReadDiscoverDependencies :: forall {k} (b :: k) (r :: EffectRow) a. Members '[Output Dependencies :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenDependencies) :: (Type -> Type) -> Type -> Type, AnnotateRead b :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #

annotateTablesFromQueries :: forall b (r :: EffectRow) a. Members '[SqlWrite b :: (Type -> Type) -> Type -> Type, AnnotateWrite b :: (Type -> Type) -> Type -> Type] r => Sem r a -> Sem r a #

reportArtifact :: forall (r :: EffectRow). Members '[Output Artifacts :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenArtifacts) :: (Type -> Type) -> Type -> Type] r => Ref Table -> Sem r () #