haskell-relational-record/doc/slide/haskell-hackathon-201412/Person.hs

16 lines
347 B
Haskell
Raw Normal View History

2014-12-21 10:16:54 +03:00
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-}
module Person where
import Data.Int
import Database.Relational.Query
import Database.Relational.Query.TH
$(defineTable defaultConfig
2014-12-21 10:16:54 +03:00
"PUBLIC" "person"
[ ("name" , [t| String |])
, ("age" , [t| Int32 |])
, ("address", [t| String |])
]
[] [0] (Just 0))