haskell-relational-record/doc/slide/haskell-hackathon-201412/Person.hs
2016-02-12 20:50:15 +09:00

16 lines
347 B
Haskell

{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-}
module Person where
import Data.Int
import Database.Relational.Query
import Database.Relational.Query.TH
$(defineTable defaultConfig
"PUBLIC" "person"
[ ("name" , [t| String |])
, ("age" , [t| Int32 |])
, ("address", [t| String |])
]
[] [0] (Just 0))