summaryrefslogtreecommitdiff
path: root/src/Database/Relational/Schema/MySQLInfo/Columns.hs
blob: d48685b9e6d7758ade067db68dd2bb560c8fc8f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}

module Database.Relational.Schema.MySQLInfo.Columns where

import Data.Int                     (Int16)
import Database.Relational.Query.TH (defineTableTypesAndRecord)

import Database.Relational.Schema.MySQLInfo.Config (config)


$(defineTableTypesAndRecord config
    "INFORMATION_SCHEMA" "columns"
    [ ("table_schema",      [t|String|])
    , ("table_name",        [t|String|])
    , ("column_name",       [t|String|])
    , ("ordinal_position",  [t|Int16|])
    , ("column_default",    [t|Maybe String|])
    , ("is_nullable",       [t|String|])
    , ("data_type",         [t|String|])
    ]
    [''Show])