Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype GetRelationSchema = GetRelationSchema {}
- newtype CheckTableExists = CheckTableExists {}
- data DeleteFrom = DeleteFrom {}
- data InsertIntoQuery = InsertIntoQuery {}
- data DropTable = DropTable {
- _dtName :: Ref Table
- _dtIfExists :: Bool
- _dtCascade :: Bool
- data DropView = DropView {
- _dvName :: Ref Table
- _dvIfExists :: Bool
- _dvCascade :: Bool
- data CreateViewAs = CreateViewAs {}
- data CopyTable = CopyTable {}
- data RenameTable = RenameTable {}
- data CreateTableAs meta = CreateTableAs {}
- class HasCreateTableAs bk where
- type BackendTableMeta bk
- createTable :: Default d => Ref Table -> Query -> CreateTableAs d
- dropView :: Ref Table -> DropView
- dropTable :: Ref Table -> DropTable
- createToInsert :: CreateTableAs m -> InsertIntoQuery
- ctaMeta :: forall meta meta. Lens (CreateTableAs meta) (CreateTableAs meta) meta meta
- ctaName :: forall meta. Lens' (CreateTableAs meta) (Ref Table)
- ctaQuery :: forall meta. Lens' (CreateTableAs meta) Query
- cvaName :: Lens' CreateViewAs (Ref Table)
- cvaQuery :: Lens' CreateViewAs Query
- rtFrom :: Lens' RenameTable (Ref Table)
- rtTo :: Lens' RenameTable (Ref Table)
- ctFrom :: Lens' CopyTable (Ref Table)
- ctTo :: Lens' CopyTable (Ref Table)
- dtCascade :: Lens' DropTable Bool
- dtIfExists :: Lens' DropTable Bool
- dtName :: Lens' DropTable (Ref Table)
- dvCascade :: Lens' DropView Bool
- dvIfExists :: Lens' DropView Bool
- dvName :: Lens' DropView (Ref Table)
- iiqQuery :: Lens' InsertIntoQuery Query
- iiqTable :: Lens' InsertIntoQuery (Ref Table)
- dfTable :: Lens' DeleteFrom (Ref Table)
- dfWhere :: Lens' DeleteFrom SExp
- cteTable :: Iso' CheckTableExists (Ref Table)
- class Drop a b | a -> b where
- dropCommand :: a -> b
- dropCascade :: a -> Lens' b Bool
- grsRelation :: Iso' GetRelationSchema Relation
- module Napkin.Types.Commands.Grant
Documentation
newtype GetRelationSchema #
Instances
newtype CheckTableExists #
Instances
data DeleteFrom #
TODO: Add in the USING clause
Instances
data InsertIntoQuery #
Instances
Drop a table
DropTable | |
|
Instances
Drop a table
DropView | |
|
Instances
data CreateViewAs #
Instances
Instances
data RenameTable #
Instances
data CreateTableAs meta #
Create table based on a query with variable metadata type, such
as TableMeta
Instances
class HasCreateTableAs 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
type BackendTableMeta bk #
Instances
HasCreateTableAs Sqlite # | |
Defined in Napkin.Types.Sqlite type BackendTableMeta Sqlite # | |
HasCreateTableAs Redshift # | |
Defined in Napkin.Types.Redshift type BackendTableMeta Redshift # | |
HasCreateTableAs Postgres # | |
Defined in Napkin.Types.Postgres type BackendTableMeta Postgres # | |
HasCreateTableAs BigQuery # | |
Defined in Napkin.Types.BigQuery type BackendTableMeta BigQuery # |
createTable :: Default d => Ref Table -> Query -> CreateTableAs d #
createToInsert :: CreateTableAs m -> InsertIntoQuery #
ctaMeta :: forall meta meta. Lens (CreateTableAs meta) (CreateTableAs meta) meta meta #
ctaQuery :: forall meta. Lens' (CreateTableAs meta) Query #
dvIfExists :: Lens' DropView Bool #
dfWhere :: Lens' DeleteFrom SExp #
class Drop a b | a -> b where #
dropCommand :: a -> b #
dropCascade :: a -> Lens' b Bool #
Instances
Drop CreateViewAs DropView # | |
Defined in Napkin.Types.Commands dropCommand :: CreateViewAs -> DropView # dropCascade :: CreateViewAs -> Lens' DropView Bool # | |
Drop (CreateTableAs ()) DropTable # | |
Defined in Napkin.Types.Commands dropCommand :: CreateTableAs () -> DropTable # dropCascade :: CreateTableAs () -> Lens' DropTable Bool # | |
Drop (CreateTableAs TableMeta) DropTable # | |
Defined in Napkin.Types.Redshift | |
Drop (CreateTableAs TableMeta) DropTable # | |
Defined in Napkin.Types.BigQuery |
module Napkin.Types.Commands.Grant