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

16 lines
354 B
Haskell

{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-}
module Birthday where
import Data.Time
import Database.Relational.Query
import Database.Relational.Query.TH
import Database.HDBC.Query.TH ()
$(defineTable defaultConfig
"PUBLIC" "birthday"
[ ("name" , [t| String |])
, ("day" , [t| Day |])
]
[] [0] (Just 0))