napkin-spec-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Run.Effects.Languages.SqlWrite

Documentation

type family BackendTableMeta bk #

type family BackendViewMeta bk #

data TableWriteStrategy #

Instances

Instances details
FromJSON TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

ToJSON TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Data TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TableWriteStrategy -> c TableWriteStrategy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TableWriteStrategy #

toConstr :: TableWriteStrategy -> Constr #

dataTypeOf :: TableWriteStrategy -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TableWriteStrategy) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableWriteStrategy) #

gmapT :: (forall b. Data b => b -> b) -> TableWriteStrategy -> TableWriteStrategy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TableWriteStrategy -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TableWriteStrategy -> r #

gmapQ :: (forall d. Data d => d -> u) -> TableWriteStrategy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TableWriteStrategy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TableWriteStrategy -> m TableWriteStrategy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TableWriteStrategy -> m TableWriteStrategy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TableWriteStrategy -> m TableWriteStrategy #

Bounded TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Enum TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Generic TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Associated Types

type Rep TableWriteStrategy 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

type Rep TableWriteStrategy = D1 ('MetaData "TableWriteStrategy" "Napkin.Run.Effects.Languages.SqlWrite" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "TableWriteStrategyRecreate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TableWriteStrategyTruncate" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TableWriteStrategyAppend" 'PrefixI 'False) (U1 :: Type -> Type)))
Show TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Eq TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

type Rep TableWriteStrategy # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

type Rep TableWriteStrategy = D1 ('MetaData "TableWriteStrategy" "Napkin.Run.Effects.Languages.SqlWrite" "napkin-spec-2.0.0-7NH5JHRFo7V8BQP5NCfMo1" 'False) (C1 ('MetaCons "TableWriteStrategyRecreate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TableWriteStrategyTruncate" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TableWriteStrategyAppend" 'PrefixI 'False) (U1 :: Type -> Type)))

data Cascade #

Constructors

Cascade 
Restrict 

Instances

Instances details
Show Cascade # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Eq Cascade # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Methods

(==) :: Cascade -> Cascade -> Bool #

(/=) :: Cascade -> Cascade -> Bool #

data SqlWrite b (m :: k) a where #

Constructors

CreateTableAsWithMeta :: forall {k} b (m :: k). BackendTableMeta b -> Ref Table -> Query -> SqlWrite b m () 
CreateViewAsWithMeta :: forall {k} b (m :: k). BackendViewMeta b -> Ref Table -> Query -> SqlWrite b m () 
CreateMaterializedViewAsWithMeta :: forall {k} b (m :: k). BackendMaterializedViewMeta b -> Ref Table -> Query -> SqlWrite b m () 
InsertIntoQuery :: forall {k} b (m :: k). Ref Table -> Query -> SqlWrite b m () 
CsvStreamInto :: forall {k} b (m :: k). CSVSettings -> Ref Table -> FilePath -> CSVHeader -> Chunks -> CsvSchema -> SqlWrite b m () 
UpdateTable :: forall {k} b (m :: k). UpdateQuery -> SqlWrite b m () 
RenameTable :: forall {k} b (m :: k). Ref Table -> Ref Table -> SqlWrite b m () 
CopyTable :: forall {k} b (m :: k). Ref Table -> Ref Table -> TableWriteStrategy -> SqlWrite b m () 
DropTable :: forall {k} b (m :: k). Ref Table -> MissingBehavior -> Cascade -> SqlWrite b m () 
DropView :: forall {k} b (m :: k). Ref Table -> MissingBehavior -> Cascade -> SqlWrite b m () 
DropMaterializedView :: forall {k} b (m :: k). Ref Table -> MissingBehavior -> Cascade -> SqlWrite b m () 
DeleteFrom :: forall {k} b (m :: k). Ref Table -> SExp -> SqlWrite b m () 
CreateTable :: forall {k} b (m :: k). BackendTableMeta b -> CreateTableDDL -> SqlWrite b m () 
InsertIntoTable :: forall {k} b (m :: k). InsertStatement -> SqlWrite b m () 

Instances

Instances details
(Show (BackendTableMeta b), Show (BackendViewMeta b), Show (BackendMaterializedViewMeta b), IsRenderable Query b, IsRenderable Statement b, IsRenderable SExp b, IsRenderable UpdateQuery b, IsRenderable Text b, Default (BackendTableMeta b), Default (BackendViewMeta b), MaybeDefault (YamlBackendMaterializedViewMeta b), Eq (BackendTableMeta b), Eq (BackendViewMeta b), Eq (YamlBackendMaterializedViewMeta b)) => ToDumpItem (b :: Type) (SqlWrite b :: (Type -> Type) -> Type -> Type) # 
Instance details

Defined in Napkin.Run.Effects.Interceptors.LogProgram.Types

Methods

toDumpItem :: forall (r :: EffectRow) x. SqlWrite b (Sem r) x -> DumpItem b #

(Show (BackendTableMeta bk), Show (BackendViewMeta bk), Show (BackendMaterializedViewMeta bk)) => GShow (SqlWrite bk a :: Type -> Type) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Methods

gshowsPrec :: Int -> SqlWrite bk a a0 -> ShowS #

(Show (BackendTableMeta bk), Show (BackendViewMeta bk), Show (BackendMaterializedViewMeta bk)) => Show (SqlWrite bk a b) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Methods

showsPrec :: Int -> SqlWrite bk a b -> ShowS #

show :: SqlWrite bk a b -> String #

showList :: [SqlWrite bk a b] -> ShowS #

(Eq (BackendTableMeta bk), Eq (BackendViewMeta bk), Eq (BackendMaterializedViewMeta bk)) => Eq (SqlWrite bk a b) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlWrite

Methods

(==) :: SqlWrite bk a b -> SqlWrite bk a b -> Bool #

(/=) :: SqlWrite bk a b -> SqlWrite bk a b -> Bool #

createTableAsWithMeta :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => BackendTableMeta b -> Ref Table -> Query -> Sem r () #

createViewAsWithMeta :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => BackendViewMeta b -> Ref Table -> Query -> Sem r () #

insertIntoQuery :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Query -> Sem r () #

csvStreamInto :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => CSVSettings -> Ref Table -> FilePath -> CSVHeader -> Chunks -> CsvSchema -> Sem r () #

updateTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => UpdateQuery -> Sem r () #

renameTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Ref Table -> Sem r () #

copyTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Ref Table -> TableWriteStrategy -> Sem r () #

dropTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> MissingBehavior -> Cascade -> Sem r () #

dropView :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> MissingBehavior -> Cascade -> Sem r () #

dropMaterializedView :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> MissingBehavior -> Cascade -> Sem r () #

deleteFrom :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => Ref Table -> SExp -> Sem r () #

createTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => BackendTableMeta b -> CreateTableDDL -> Sem r () #

insertIntoTable :: forall b (r :: EffectRow). Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r => InsertStatement -> Sem r () #

createTableAs :: forall b (r :: EffectRow). (Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r, Default (BackendTableMeta b)) => Ref Table -> Query -> Sem r () #

createTableIfNotExistAs :: forall b (r :: EffectRow). (Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r, Default (BackendTableMeta b)) => Ref Table -> Query -> Sem r () #

createViewAs :: forall b (r :: EffectRow). (Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r, Default (BackendViewMeta b)) => Ref Table -> Query -> Sem r () #

createEmptyTable :: forall b (r :: EffectRow). (Member (SqlWrite b :: (Type -> Type) -> Type -> Type) r, Default (BackendTableMeta b)) => Ref Table -> CsvSchema -> Sem r () #