| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Database.MySQL.Hasqlator.Typed.Schema
Synopsis
- data TableInfo = TableInfo {- tableName :: Text
- tableSchema :: Text
- tableColumns :: [ColumnInfo]
 
- data ColumnInfo = ColumnInfo {- columnTableSchema :: Text
- columnTableName :: Text
- columnName :: Text
- columnType :: ColumnType
- columnNullable :: Bool
- primaryKey :: Bool
- autoIncrement :: Bool
- foreignKey :: Maybe (Text, Text, Text)
 
- fetchTableInfo :: MySQLConn -> [Text] -> IO [TableInfo]
- data Sign
- data ColumnType- = TinyIntColumn Sign
- | SmallIntColumn Sign
- | MediumIntColumn Sign
- | IntColumn Sign
- | BigIntColumn Sign
- | DecimalColumn Int Int Sign
- | VarCharColumn Int
- | CharColumn Int
- | TextColumn
- | BlobColumn
- | DateTimeColumn Int
- | TimestampColumn Int
- | DateColumn
- | TimeColumn Int
- | DoubleColumn
- | FloatColumn
- | EnumColumn [Text]
- | SetColumn [Text]
- | BinaryColumn Int
- | VarBinaryColumn Int
- | BitColumn Int
- | JsonColumn
 
- pprTableInfo :: Text -> [TableInfo] -> Text
- data Properties = Properties {- fieldNameModifier :: ColumnInfo -> String
- tableNameModifier :: TableInfo -> String
- classNameModifier :: String -> String
- includeSchema :: Bool
- insertorTypeModifier :: TableInfo -> String
- insertorNameModifier :: TableInfo -> String
- updatorNameModifier :: TableInfo -> String
- selectorNameModifier :: TableInfo -> String
- fieldsQualifier :: String
- insertorFieldModifier :: ColumnInfo -> String
 
- defaultProperties :: Properties
- makeFields :: Properties -> Name -> [TableInfo] -> Q [Dec]
- smartUpcase :: String -> String
- smartDowncase :: String -> String
- makeRecords :: Properties -> [TableInfo] -> Q [Dec]
- makeSelectors :: Properties -> Name -> [TableInfo] -> Q [Dec]
- makeInsertors :: Properties -> Name -> [TableInfo] -> Q [Dec]
- makeUpdators :: Properties -> Name -> [TableInfo] -> Q [Dec]
Documentation
Constructors
| TableInfo | |
| Fields 
 | |
data ColumnInfo Source #
Constructors
| ColumnInfo | |
| Fields 
 | |
Instances
| Show ColumnInfo Source # | |
| Defined in Database.MySQL.Hasqlator.Typed.Schema Methods showsPrec :: Int -> ColumnInfo -> ShowS # show :: ColumnInfo -> String # showList :: [ColumnInfo] -> ShowS # | |
fetchTableInfo :: MySQLConn -> [Text] -> IO [TableInfo] Source #
Fetch TableInfo structures for each of the given schemas, using
 the given MySQLConn connection.
data ColumnType Source #
Constructors
Instances
| Show ColumnType Source # | |
| Defined in Database.MySQL.Hasqlator.Typed.Schema Methods showsPrec :: Int -> ColumnType -> ShowS # show :: ColumnType -> String # showList :: [ColumnType] -> ShowS # | |
data Properties Source #
Constructors
| Properties | |
| Fields 
 | |
makeFields :: Properties -> Name -> [TableInfo] -> Q [Dec] Source #
smartUpcase :: String -> String Source #
smartDowncase :: String -> String Source #
makeRecords :: Properties -> [TableInfo] -> Q [Dec] Source #
makeSelectors :: Properties -> Name -> [TableInfo] -> Q [Dec] Source #
makeInsertors :: Properties -> Name -> [TableInfo] -> Q [Dec] Source #
makeUpdators :: Properties -> Name -> [TableInfo] -> Q [Dec] Source #