Fix broken example.

This commit is contained in:
Kei Hibino 2016-04-30 17:54:52 +09:00
parent f08956b2ae
commit fa2f6cf7f0
2 changed files with 4 additions and 3 deletions

View File

@ -31,6 +31,7 @@ executable example
, HDBC-session , HDBC-session
, names-th , names-th
, relational-query >= 0.7 , relational-query >= 0.7
, relational-schemas
, relational-query-HDBC >= 0.4 , relational-query-HDBC >= 0.4
, time , time
default-language: default-language:

View File

@ -19,8 +19,8 @@ import Database.HDBC.MySQL ( Connection
) )
import Database.Relational.Schema.MySQLInfo.Config (config) import Database.Relational.Schema.MySQLInfo.Config (config)
config :: MySQLConnectInfo connConfig :: MySQLConnectInfo
config = defaultMySQLConnectInfo { connConfig = defaultMySQLConnectInfo {
mysqlUser = "hrr-tester" mysqlUser = "hrr-tester"
, mysqlPassword = "" , mysqlPassword = ""
, mysqlDatabase = "TEST" , mysqlDatabase = "TEST"
@ -28,7 +28,7 @@ config = defaultMySQLConnectInfo {
} }
connect :: IO Connection connect :: IO Connection
connect = connectMySQL config connect = connectMySQL connConfig
defineTable :: [(String, TypeQ)] -> String -> String -> [Name] -> Q [Dec] defineTable :: [(String, TypeQ)] -> String -> String -> [Name] -> Q [Dec]
defineTable tmap = defineTableFromDB' connect config (driverMySQL { typeMap = tmap }) defineTable tmap = defineTableFromDB' connect config (driverMySQL { typeMap = tmap })