HDBC-1.1.3: Haskell Database ConnectivityContentsIndex
MaintainerJohn Goerzen <jgoerzen@complete.org>

Definitions of, and utilities for, specifying what type of data is represented by a column.

Written by John Goerzen, jgoerzen@complete.org

data SqlColDesc = SqlColDesc {
colType :: SqlTypeId
colSize :: (Maybe Int)
colOctetLength :: (Maybe Int)
colDecDigits :: (Maybe Int)
colNullable :: (Maybe Bool)
data SqlTypeId
= SqlCharT
| SqlVarCharT
| SqlLongVarCharT
| SqlWCharT
| SqlWVarCharT
| SqlWLongVarCharT
| SqlDecimalT
| SqlNumericT
| SqlSmallIntT
| SqlIntegerT
| SqlRealT
| SqlFloatT
| SqlDoubleT
| SqlBitT
| SqlTinyIntT
| SqlBigIntT
| SqlBinaryT
| SqlVarBinaryT
| SqlLongVarBinaryT
| SqlDateT
| SqlTimeT
| SqlTimestampT
| SqlUTCDateTimeT
| SqlUTCTimeT
| SqlIntervalT SqlInterval
| SqlUnknownT String
data SqlInterval
= SqlIntervalMonthT
| SqlIntervalYearT
| SqlIntervalYearToMonthT
| SqlIntervalDayT
| SqlIntervalHourT
| SqlIntervalMinuteT
| SqlIntervalSecondT
| SqlIntervalDayToHourT
| SqlIntervalDayToMinuteT
| SqlIntervalDayToSecondT
| SqlIntervalHourToMinuteT
| SqlIntervalHourToSecondT
| SqlIntervalMinuteToSecondT
data SqlColDesc

The description of a column.

Fields are Nothing if the database backend cannot supply the requested information.

The colSize field works like this:

For character types, the maximum width of the column. For numeric types, the total number of digits allowed. See the ODBC manual for more.

The colOctetLength field is defined for character and binary types, and gives the number of bytes the column requires, regardless of encoding.

colType :: SqlTypeIdType of data stored here
colSize :: (Maybe Int)The size of a column
colOctetLength :: (Maybe Int)The maximum size in octets
colDecDigits :: (Maybe Int)Digits to the right of the period
colNullable :: (Maybe Bool)Whether NULL is acceptable
show/hide Instances
data SqlTypeId

The type identifier for a given column.

This represents the type of data stored in the column in the underlying SQL engine. It does not form the entire column type; see SqlColDesc for that.

These types correspond mainly to those defined by ODBC.

SqlCharTFixed-width character strings
SqlVarCharTVariable-width character strings
SqlLongVarCharTVariable-width character strings, max length implementation dependant
SqlWCharTFixed-width Unicode strings
SqlWVarCharTVariable-width Unicode strings
SqlWLongVarCharTVariable-width Unicode strings, max length implementation dependant
SqlDecimalTSigned exact values
SqlNumericTSigned exact integer values
SqlSmallIntT16-bit integer values
SqlIntegerT32-bit integer values
SqlFloatTSigned inexact floating-point values
SqlDoubleTSigned inexact double-precision values
SqlBitTA single bit
SqlTinyIntT8-bit integer values
SqlBigIntT64-bit integer values
SqlBinaryTFixed-length binary data
SqlVarBinaryTVariable-length binary data
SqlLongVarBinaryTVariable-length binary data, max length implementation dependant
SqlDateTA date
SqlTimeTA time
SqlTimestampTCombined date and time
SqlUTCDateTimeTUTC date/time
SqlUTCTimeTUTC time
SqlIntervalT SqlIntervalA time or date difference
SqlGUIDTGlobal unique identifier
SqlUnknownT StringA type not represented here; implementation-specific information in the String
show/hide Instances
data SqlInterval
The different types of intervals in SQL.
SqlIntervalMonthTDifference in months
SqlIntervalYearTDifference in years
SqlIntervalYearToMonthTDifference in years+months
SqlIntervalDayTDifference in days
SqlIntervalHourTDifference in hours
SqlIntervalMinuteTDifference in minutes
SqlIntervalSecondTDifference in seconds
SqlIntervalDayToHourTDifference in days+hours
SqlIntervalDayToMinuteTDifference in days+minutes
SqlIntervalDayToSecondTDifference in days+seconds
SqlIntervalHourToMinuteTDifference in hours+minutes
SqlIntervalHourToSecondTDifference in hours+seconds
SqlIntervalMinuteToSecondTDifference in minutes+seconds
show/hide Instances
Produced by Haddock version 0.8