Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- newtype Prefix = Prefix {}
- data CreateTable meta = CreateTable {}
- data DropTable = DropTable {}
- data CreateView meta = CreateView {}
- data DropView = DropView {
- dvName :: Ref Table
- dvMaterialized :: ViewType
- dvIfExists :: Bool
- dvCascade :: Bool
- data AEDA = AEDA {}
- newtype ListTables = ListTables {}
- type family BackendTableMeta bk
- type family BackendMaterializedViewMeta bk
- type family BackendViewMeta bk
- data InsertIntoQuery = InsertIntoQuery {}
- data TableWriteStrategy
- newtype ReadAnnotationCommand = ReadAnnotationCommand {}
- newtype CheckTableExists = CheckTableExists {}
- newtype GetTableKind = GetTableKind {}
- data AnnotateCommand = AnnotateCommand {}
- data AnnotateCommandType
- data RenameTable = RenameTable {}
- data CopyTable = CopyTable {
- ctFrom :: Ref Table
- ctTo :: Ref Table
- ctIfExists :: TableWriteStrategy
- data DeleteFrom = DeleteFrom {}
- data ViewType
- data CreateMaterializedView meta = CreateMaterializedView {}
- data GetRelationSchema = GetRelationSchema {}
- newtype NormalizeTableNames = NormalizeTableNames {
- _ntnTables :: Set (Ref Table)
- createTable :: Default d => Ref Table -> Query -> CreateTable d
- dropTable :: Ref Table -> DropTable
- dropView :: Ref Table -> DropView
- renderBigQuery :: TableWriteStrategy -> Text
- commandTypeToDescriptions :: AnnotateCommandType -> [AnnotateDescription]
- execCopyTable :: forall meta backend m return return' return''. (MonadNapkin backend m, Default meta, Command (CreateTable meta) return backend, Command InsertIntoQuery return backend, Command DropTable return'' backend, Command DeleteFrom return' backend) => BackendConn backend -> CopyTable -> m return
- module Napkin.Types.Commands.Grant
Documentation
Instances
Data Prefix # | |
Defined in Napkin.Types.Commands gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Prefix -> c Prefix # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Prefix # toConstr :: Prefix -> Constr # dataTypeOf :: Prefix -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Prefix) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Prefix) # gmapT :: (forall b. Data b => b -> b) -> Prefix -> Prefix # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Prefix -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Prefix -> r # gmapQ :: (forall d. Data d => d -> u) -> Prefix -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Prefix -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Prefix -> m Prefix # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Prefix -> m Prefix # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Prefix -> m Prefix # | |
Show Prefix # | |
Buildable Prefix # | |
Defined in Napkin.Types.Commands | |
Eq Prefix # | |
Ord Prefix # | |
data CreateTable meta #
Create table based on a query with variable metadata type, such
as TableMeta
Instances
Drop a table
Instances
data CreateView meta #
Instances
Drop a table
DropView | |
|
Instances
Instances
newtype ListTables #
Instances
type family BackendTableMeta bk #
Operations like recreate
often result in ambiguous types at
application site. In general, we need to be able to infer a
type for the table metadata type for each backend. Our life is
complicated by the likes of Redshift TableMeta
Instances
type BackendTableMeta BigQuery # | |
Defined in Napkin.Types.BigQuery | |
type BackendTableMeta MsSql # | |
Defined in Napkin.Types.MsSql | |
type BackendTableMeta Postgres # | |
Defined in Napkin.Types.Postgres | |
type BackendTableMeta Redshift # | |
Defined in Napkin.Types.Redshift | |
type BackendTableMeta Sqlite # | |
Defined in Napkin.Types.Sqlite |
type family BackendMaterializedViewMeta bk #
Instances
type BackendMaterializedViewMeta BigQuery # | |
Defined in Napkin.Types.BigQuery | |
type BackendMaterializedViewMeta MsSql # | |
Defined in Napkin.Types.MsSql | |
type BackendMaterializedViewMeta Postgres # | |
Defined in Napkin.Types.Postgres | |
type BackendMaterializedViewMeta Redshift # | |
Defined in Napkin.Types.Redshift | |
type BackendMaterializedViewMeta Sqlite # | |
Defined in Napkin.Types.Sqlite |
type family BackendViewMeta bk #
Instances
type BackendViewMeta BigQuery # | |
Defined in Napkin.Types.BigQuery | |
type BackendViewMeta MsSql # | |
Defined in Napkin.Types.MsSql | |
type BackendViewMeta Postgres # | |
Defined in Napkin.Types.Postgres | |
type BackendViewMeta Redshift # | |
Defined in Napkin.Types.Redshift | |
type BackendViewMeta Sqlite # | |
Defined in Napkin.Types.Sqlite |
data InsertIntoQuery #
Instances
data TableWriteStrategy #
csv importing/copy option
Instances
newtype ReadAnnotationCommand #
Instances
Command ReadAnnotationCommand TableAnnotations BigQuery # | |
Defined in Napkin.Run.BigQuery execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> ReadAnnotationCommand -> m TableAnnotations # | |
Command ReadAnnotationCommand TableAnnotations MsSql # | |
Defined in Napkin.Run.MsSql execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> ReadAnnotationCommand -> m TableAnnotations # | |
Command ReadAnnotationCommand TableAnnotations Postgres # | |
Defined in Napkin.Run.Postgres execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> ReadAnnotationCommand -> m TableAnnotations # | |
Command ReadAnnotationCommand TableAnnotations Redshift # | |
Defined in Napkin.Run.Redshift execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> ReadAnnotationCommand -> m TableAnnotations # | |
Command ReadAnnotationCommand TableAnnotations Sqlite # | |
Defined in Napkin.Run.Sqlite execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> ReadAnnotationCommand -> m TableAnnotations # |
newtype CheckTableExists #
Instances
newtype GetTableKind #
Instances
data AnnotateCommand #
Instances
Command AnnotateCommand () BigQuery # | |
Defined in Napkin.Run.BigQuery execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> AnnotateCommand -> m () # | |
Command AnnotateCommand () MsSql # | |
Defined in Napkin.Run.MsSql execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> AnnotateCommand -> m () # | |
Command AnnotateCommand () Postgres # | |
Defined in Napkin.Run.Postgres execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> AnnotateCommand -> m () # | |
Command AnnotateCommand () Redshift # | |
Defined in Napkin.Run.Redshift execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> AnnotateCommand -> m () # | |
Command AnnotateCommand () Sqlite # | |
Defined in Napkin.Run.Sqlite execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> AnnotateCommand -> m () # |
data RenameTable #
Instances
CopyTable | |
|
Instances
data DeleteFrom #
TODO: Add in the USING clause
Instances
Instances
Data ViewType # | |
Defined in Napkin.Types.Commands gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ViewType -> c ViewType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ViewType # toConstr :: ViewType -> Constr # dataTypeOf :: ViewType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ViewType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ViewType) # gmapT :: (forall b. Data b => b -> b) -> ViewType -> ViewType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewType -> r # gmapQ :: (forall d. Data d => d -> u) -> ViewType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ViewType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ViewType -> m ViewType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewType -> m ViewType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewType -> m ViewType # | |
Generic ViewType # | |
Show ViewType # | |
Eq ViewType # | |
type Rep ViewType # | |
data CreateMaterializedView meta #
Instances
data GetRelationSchema #
Instances
newtype NormalizeTableNames #
Instances
createTable :: Default d => Ref Table -> Query -> CreateTable d #
execCopyTable :: forall meta backend m return return' return''. (MonadNapkin backend m, Default meta, Command (CreateTable meta) return backend, Command InsertIntoQuery return backend, Command DropTable return'' backend, Command DeleteFrom return' backend) => BackendConn backend -> CopyTable -> m return #
Default CopyTable Command implementation
module Napkin.Types.Commands.Grant