| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.PostgreSQL.PQTypes.Model.Table
Synopsis
- data TableColumn = TableColumn {
- colName :: RawSQL ()
- colType :: ColumnType
- colNullable :: Bool
- colDefault :: Maybe (RawSQL ())
- tblColumn :: TableColumn
- sqlAddColumn :: TableColumn -> RawSQL ()
- sqlAlterColumn :: RawSQL () -> RawSQL () -> RawSQL ()
- sqlDropColumn :: RawSQL () -> RawSQL ()
- data Rows = (Show row, ToRow row) => Rows [ByteString] [row]
- data Table = Table {
- tblName :: RawSQL ()
- tblVersion :: Int32
- tblAcceptedDbVersions :: [Int32]
- tblColumns :: [TableColumn]
- tblPrimaryKey :: Maybe PrimaryKey
- tblChecks :: [Check]
- tblForeignKeys :: [ForeignKey]
- tblIndexes :: [TableIndex]
- tblInitialSetup :: Maybe TableInitialSetup
- tblTable :: Table
- sqlCreateTable :: RawSQL () -> RawSQL ()
- sqlAlterTable :: RawSQL () -> [RawSQL ()] -> RawSQL ()
- data DropTableMode
- sqlDropTable :: RawSQL () -> DropTableMode -> RawSQL ()
- data TableInitialSetup = TableInitialSetup {
- checkInitialSetup :: forall m. (MonadDB m, MonadThrow m) => m Bool
- initialSetup :: forall m. (MonadDB m, MonadThrow m) => m ()
Documentation
data TableColumn Source #
Constructors
| TableColumn | |
Fields
| |
Instances
| Show TableColumn Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Table Methods showsPrec :: Int -> TableColumn -> ShowS # show :: TableColumn -> String # showList :: [TableColumn] -> ShowS # | |
sqlAddColumn :: TableColumn -> RawSQL () Source #
sqlDropColumn :: RawSQL () -> RawSQL () Source #
Constructors
| Table | |
Fields
| |
sqlCreateTable :: RawSQL () -> RawSQL () Source #
data DropTableMode Source #
Whether to also drop objects that depend on the table.
Constructors
| DropTableCascade | Automatically drop objects that depend on the table (such as views). |
| DropTableRestrict | Refuse to drop the table if any objects depend on it. This is the default. |
sqlDropTable :: RawSQL () -> DropTableMode -> RawSQL () Source #
data TableInitialSetup Source #
Constructors
| TableInitialSetup | |
Fields
| |