Copyright | (c) Winterland 2016 |
---|---|
License | BSD |
Maintainer | drkoster@qq.com |
Stability | experimental |
Portability | PORTABLE |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Column definition(aka. field type).
Synopsis
- data ColumnDef = ColumnDef {
- columnDB :: !ByteString
- columnTable :: !ByteString
- columnOrigTable :: !ByteString
- columnName :: !ByteString
- columnOrigName :: !ByteString
- columnCharSet :: !Word16
- columnLength :: !Word32
- columnType :: !FieldType
- columnFlags :: !Word16
- columnDecimals :: !Word8
- getField :: Get ColumnDef
- putField :: ColumnDef -> Put
- newtype FieldType = FieldType Word8
- mySQLTypeDecimal :: FieldType
- mySQLTypeTiny :: FieldType
- mySQLTypeShort :: FieldType
- mySQLTypeLong :: FieldType
- mySQLTypeFloat :: FieldType
- mySQLTypeDouble :: FieldType
- mySQLTypeNull :: FieldType
- mySQLTypeTimestamp :: FieldType
- mySQLTypeLongLong :: FieldType
- mySQLTypeInt24 :: FieldType
- mySQLTypeDate :: FieldType
- mySQLTypeTime :: FieldType
- mySQLTypeDateTime :: FieldType
- mySQLTypeYear :: FieldType
- mySQLTypeNewDate :: FieldType
- mySQLTypeVarChar :: FieldType
- mySQLTypeBit :: FieldType
- mySQLTypeTimestamp2 :: FieldType
- mySQLTypeDateTime2 :: FieldType
- mySQLTypeTime2 :: FieldType
- mySQLTypeNewDecimal :: FieldType
- mySQLTypeEnum :: FieldType
- mySQLTypeSet :: FieldType
- mySQLTypeTinyBlob :: FieldType
- mySQLTypeMediumBlob :: FieldType
- mySQLTypeLongBlob :: FieldType
- mySQLTypeBlob :: FieldType
- mySQLTypeVarString :: FieldType
- mySQLTypeString :: FieldType
- mySQLTypeGeometry :: FieldType
- getFieldType :: Get FieldType
- putFieldType :: FieldType -> Put
- flagNotNull :: Word16 -> Bool
- flagPrimaryKey :: Word16 -> Bool
- flagUniqueKey :: Word16 -> Bool
- flagMultipleKey :: Word16 -> Bool
- flagBlob :: Word16 -> Bool
- flagUnsigned :: Word16 -> Bool
- flagZeroFill :: Word16 -> Bool
- flagBinary :: Word16 -> Bool
- flagEnum :: Word16 -> Bool
- flagAutoIncrement :: Word16 -> Bool
- flagTimeStamp :: Word16 -> Bool
- flagSet :: Word16 -> Bool
- flagNoDefaultValue :: Word16 -> Bool
- flagPartKey :: Word16 -> Bool
- flagNumeric :: Word16 -> Bool
Documentation
A description of a field (column) of a table.
ColumnDef | |
|
newtype
around Word8
for represent MySQL_TYPE
, We don't use sum type here for speed reason.
putFieldType :: FieldType -> Put Source #
flagNotNull :: Word16 -> Bool Source #
flagPrimaryKey :: Word16 -> Bool Source #
flagUniqueKey :: Word16 -> Bool Source #
flagMultipleKey :: Word16 -> Bool Source #
flagUnsigned :: Word16 -> Bool Source #
flagZeroFill :: Word16 -> Bool Source #
flagBinary :: Word16 -> Bool Source #
flagAutoIncrement :: Word16 -> Bool Source #
flagTimeStamp :: Word16 -> Bool Source #
flagNoDefaultValue :: Word16 -> Bool Source #
flagPartKey :: Word16 -> Bool Source #
flagNumeric :: Word16 -> Bool Source #