mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-26 05:12:57 +03:00
12 lines
408 B
Haskell
12 lines
408 B
Haskell
module DS (definePgConTable) where
|
|
|
|
import Language.Haskell.TH
|
|
-- import Language.Haskell.TH.Name.CamelCase (ConName)
|
|
import Database.HDBC.PostgreSQL (connectPostgreSQL)
|
|
import Database.HDBC.Query.TH
|
|
import Database.HDBC.Schema.PostgreSQL (driverPostgreSQL)
|
|
|
|
definePgConTable :: String -> String -> [Name] -> Q [Dec]
|
|
definePgConTable =
|
|
defineTableFromDB (connectPostgreSQL "dbname=pgcon") driverPostgreSQL
|