{-# LANGUAGE DeriveDataTypeable #-}
module Database.HDBC.ColTypes (SqlColDesc(..),
SqlTypeId(..),
SqlInterval(..)
)
where
import Data.Dynamic
data SqlColDesc =
SqlColDesc {
SqlColDesc -> SqlTypeId
colType :: SqlTypeId
,SqlColDesc -> Maybe Int
colSize :: Maybe Int
,SqlColDesc -> Maybe Int
colOctetLength :: Maybe Int
,SqlColDesc -> Maybe Int
colDecDigits :: Maybe Int
,SqlColDesc -> Maybe Bool
colNullable :: Maybe Bool
}
deriving (SqlColDesc -> SqlColDesc -> Bool
(SqlColDesc -> SqlColDesc -> Bool)
-> (SqlColDesc -> SqlColDesc -> Bool) -> Eq SqlColDesc
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlColDesc -> SqlColDesc -> Bool
$c/= :: SqlColDesc -> SqlColDesc -> Bool
== :: SqlColDesc -> SqlColDesc -> Bool
$c== :: SqlColDesc -> SqlColDesc -> Bool
Eq, ReadPrec [SqlColDesc]
ReadPrec SqlColDesc
Int -> ReadS SqlColDesc
ReadS [SqlColDesc]
(Int -> ReadS SqlColDesc)
-> ReadS [SqlColDesc]
-> ReadPrec SqlColDesc
-> ReadPrec [SqlColDesc]
-> Read SqlColDesc
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlColDesc]
$creadListPrec :: ReadPrec [SqlColDesc]
readPrec :: ReadPrec SqlColDesc
$creadPrec :: ReadPrec SqlColDesc
readList :: ReadS [SqlColDesc]
$creadList :: ReadS [SqlColDesc]
readsPrec :: Int -> ReadS SqlColDesc
$creadsPrec :: Int -> ReadS SqlColDesc
Read, Int -> SqlColDesc -> ShowS
[SqlColDesc] -> ShowS
SqlColDesc -> String
(Int -> SqlColDesc -> ShowS)
-> (SqlColDesc -> String)
-> ([SqlColDesc] -> ShowS)
-> Show SqlColDesc
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlColDesc] -> ShowS
$cshowList :: [SqlColDesc] -> ShowS
show :: SqlColDesc -> String
$cshow :: SqlColDesc -> String
showsPrec :: Int -> SqlColDesc -> ShowS
$cshowsPrec :: Int -> SqlColDesc -> ShowS
Show, Typeable)
data SqlTypeId =
SqlCharT
| SqlVarCharT
| SqlLongVarCharT
| SqlWCharT
| SqlWVarCharT
| SqlWLongVarCharT
| SqlDecimalT
| SqlNumericT
| SqlSmallIntT
| SqlIntegerT
| SqlRealT
| SqlFloatT
| SqlDoubleT
| SqlBitT
| SqlTinyIntT
| SqlBigIntT
| SqlBinaryT
| SqlVarBinaryT
| SqlLongVarBinaryT
| SqlDateT
| SqlTimeT
| SqlTimeWithZoneT
| SqlTimestampT
| SqlTimestampWithZoneT
| SqlUTCDateTimeT
| SqlUTCTimeT
| SqlIntervalT SqlInterval
| SqlGUIDT
| SqlUnknownT String
deriving (SqlTypeId -> SqlTypeId -> Bool
(SqlTypeId -> SqlTypeId -> Bool)
-> (SqlTypeId -> SqlTypeId -> Bool) -> Eq SqlTypeId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlTypeId -> SqlTypeId -> Bool
$c/= :: SqlTypeId -> SqlTypeId -> Bool
== :: SqlTypeId -> SqlTypeId -> Bool
$c== :: SqlTypeId -> SqlTypeId -> Bool
Eq, Int -> SqlTypeId -> ShowS
[SqlTypeId] -> ShowS
SqlTypeId -> String
(Int -> SqlTypeId -> ShowS)
-> (SqlTypeId -> String)
-> ([SqlTypeId] -> ShowS)
-> Show SqlTypeId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlTypeId] -> ShowS
$cshowList :: [SqlTypeId] -> ShowS
show :: SqlTypeId -> String
$cshow :: SqlTypeId -> String
showsPrec :: Int -> SqlTypeId -> ShowS
$cshowsPrec :: Int -> SqlTypeId -> ShowS
Show, ReadPrec [SqlTypeId]
ReadPrec SqlTypeId
Int -> ReadS SqlTypeId
ReadS [SqlTypeId]
(Int -> ReadS SqlTypeId)
-> ReadS [SqlTypeId]
-> ReadPrec SqlTypeId
-> ReadPrec [SqlTypeId]
-> Read SqlTypeId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlTypeId]
$creadListPrec :: ReadPrec [SqlTypeId]
readPrec :: ReadPrec SqlTypeId
$creadPrec :: ReadPrec SqlTypeId
readList :: ReadS [SqlTypeId]
$creadList :: ReadS [SqlTypeId]
readsPrec :: Int -> ReadS SqlTypeId
$creadsPrec :: Int -> ReadS SqlTypeId
Read, Typeable)
data SqlInterval =
SqlIntervalMonthT
| SqlIntervalYearT
| SqlIntervalYearToMonthT
| SqlIntervalDayT
| SqlIntervalHourT
| SqlIntervalMinuteT
| SqlIntervalSecondT
| SqlIntervalDayToHourT
| SqlIntervalDayToMinuteT
| SqlIntervalDayToSecondT
| SqlIntervalHourToMinuteT
| SqlIntervalHourToSecondT
| SqlIntervalMinuteToSecondT
deriving (SqlInterval -> SqlInterval -> Bool
(SqlInterval -> SqlInterval -> Bool)
-> (SqlInterval -> SqlInterval -> Bool) -> Eq SqlInterval
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlInterval -> SqlInterval -> Bool
$c/= :: SqlInterval -> SqlInterval -> Bool
== :: SqlInterval -> SqlInterval -> Bool
$c== :: SqlInterval -> SqlInterval -> Bool
Eq, Int -> SqlInterval -> ShowS
[SqlInterval] -> ShowS
SqlInterval -> String
(Int -> SqlInterval -> ShowS)
-> (SqlInterval -> String)
-> ([SqlInterval] -> ShowS)
-> Show SqlInterval
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlInterval] -> ShowS
$cshowList :: [SqlInterval] -> ShowS
show :: SqlInterval -> String
$cshow :: SqlInterval -> String
showsPrec :: Int -> SqlInterval -> ShowS
$cshowsPrec :: Int -> SqlInterval -> ShowS
Show, ReadPrec [SqlInterval]
ReadPrec SqlInterval
Int -> ReadS SqlInterval
ReadS [SqlInterval]
(Int -> ReadS SqlInterval)
-> ReadS [SqlInterval]
-> ReadPrec SqlInterval
-> ReadPrec [SqlInterval]
-> Read SqlInterval
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlInterval]
$creadListPrec :: ReadPrec [SqlInterval]
readPrec :: ReadPrec SqlInterval
$creadPrec :: ReadPrec SqlInterval
readList :: ReadS [SqlInterval]
$creadList :: ReadS [SqlInterval]
readsPrec :: Int -> ReadS SqlInterval
$creadsPrec :: Int -> ReadS SqlInterval
Read, Typeable)