mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-16 07:52:05 +03:00
7e98380848
--HG-- rename : schema-th/pgTest/PgTest.hs => relational-join-HDBC-pgTest/pgTest/PgTest.hs rename : schema-th/pgTest/PgTestDataSource.hs => relational-join-HDBC-pgTest/pgTest/PgTestDataSource.hs rename : schema-th/pgTest/runCreate.sh => relational-join-HDBC-pgTest/pgTest/runCreate.sh rename : schema-th/pgTest/runDrop.sh => relational-join-HDBC-pgTest/pgTest/runDrop.sh rename : schema-th/sample/1/Group.hs => relational-join-HDBC-pgTest/sample/1/Group.hs rename : schema-th/sample/1/Membership.hs => relational-join-HDBC-pgTest/sample/1/Membership.hs rename : schema-th/sample/1/README => relational-join-HDBC-pgTest/sample/1/README rename : schema-th/sample/1/User.hs => relational-join-HDBC-pgTest/sample/1/User.hs rename : schema-th/sample/1/create.sh => relational-join-HDBC-pgTest/sample/1/create.sh rename : schema-th/sample/1/drop.sh => relational-join-HDBC-pgTest/sample/1/drop.sh rename : schema-th/sample/1/querySample.hs => relational-join-HDBC-pgTest/sample/1/querySample.hs
27 lines
744 B
Haskell
27 lines
744 B
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
|
|
|
module PgTest where
|
|
|
|
import Distribution.TestSuite (Test)
|
|
import PgTestDataSource (defineTable)
|
|
-- import Database.HDBC.PostgreSQL (connectPostgreSQL, Connection)
|
|
-- import Database.HDBC.Schema.PostgreSQL (driverPostgreSQL)
|
|
-- import Database.HDBC.Schema.Driver (typeMap)
|
|
-- import Database.HDBC.TH (defineTableFromDB)
|
|
import Data.ByteString (ByteString)
|
|
import Data.Text (Text)
|
|
|
|
tests :: [Test]
|
|
tests = []
|
|
|
|
$(defineTable
|
|
[("varchar", [t| ByteString |]),
|
|
("text", [t| Text |])
|
|
]
|
|
"TEST" "test_table0" [])
|
|
-- defineTableFromDB
|
|
-- (connectPostgreSQL "dbname=testdb")
|
|
-- (driverPostgreSQL { typeMap = [("varchar", [t| Text |])] })
|
|
-- "TEST" "test_table0" []
|