summaryrefslogtreecommitdiff
path: root/src/Database/Relational/Schema/DB2Syscat/Tabconst.hs
blob: 56b962cab5aa035a6a3839442fa2e5a612d7cdb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}

-- |
-- Module      : Database.Relational.Schema.DB2Syscat.Tabconst
-- Copyright   : 2013 Kei Hibino
-- License     : BSD3
--
-- Maintainer  : ex8k.hibino@gmail.com
-- Stability   : experimental
-- Portability : unknown
--
-- Generate template of SYSCAT.tabconst system catalog table.
-- Not all columns are mapped to Haskell record.
-- Minimum implementation required to generate table constraints.
module Database.Relational.Schema.DB2Syscat.Tabconst where

import Database.Relational.Query.TH (defineTableTypesAndRecord)

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


-- Not all column is mapped. Minimum implementation.
$(defineTableTypesAndRecord config
  "SYSCAT" "tabconst"
  [("constname", [t| String |]),
   ("tabschema", [t| String |]),
   ("tabname"  , [t| String |]),
   --
   ("type"     , [t| String |]),
   ("enforced" , [t| String |])]
  [''Show])