napkin-0.5.10
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Napkin.Run.Execute

Description

 
Synopsis

Documentation

type SpecBackend bk drop t1 t2 t3 t4 t5 t6 t7 t8 t9 = (Command CreateViewAs t3 bk, Command CheckTableExists Bool bk, Command Grant t1 bk, Command (CreateTableAs (BackendTableMeta bk)) t4 bk, Command InsertIntoQuery t6 bk, Command drop t5 bk, Command DropView t2 bk, Command DropTable t5 bk, Command CopyTable t9 bk, Command DeleteFrom t8 bk, Command RenameTable t7 bk, Command GetRelationSchema (Fields Field) bk, Drop (CreateTableAs (BackendTableMeta bk)) drop, RenderSql (CreateTableAs (BackendTableMeta bk)) bk, RenderSql CreateViewAs bk, RenderSql (Ref Table) bk, RenderSql Query bk, RenderSql SExp bk, ReplaceReference bk, ParseSQL bk, Backend bk, MustacheBackend bk, Typeable bk, IsBackendTableMeta bk, RunBackendEffect bk) #

What we seem to need to be able to call executeSpec; it's basically all about choosing a backend that satisfies the needed operations.

type Success = Bool #

executeSpec :: forall m bk drop t1 t2 t3 t4 t5 t6 t7 t8 t9. (MonadFix m, MonadBaseControl IO m, MonadMask m, Katip m, MonadReader ComboEnv m, SpecBackend bk drop t1 t2 t3 t4 t5 t6 t7 t8 t9, MonadQueryStats m, RunBackendEffect bk) => RuntimeEnv -> bk -> MetadataBeamConnection -> SpecRuntime bk -> ValidatedInterpretedSpec bk -> Set (Ref Table) -> m Success #

reportProgress :: (Show a, Exception a) => Maybe RuntimeEventQueue -> Ref Table -> ComboT IO (Either a b, SpecRun) -> ComboT IO (Either a b, SpecRun) #

Report runtime updates as the Spec execution progresses.

validateSpecs :: forall m bk. (MonadIO m, ValidateAndPreprocess bk) => RuntimeEnv -> RawInterpretedSpec bk -> m (Either (NonEmpty ValidationError) (ValidatedInterpretedSpec bk)) #

Run basic checks against all Specs and convert every raw query to normal Query.