mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-29 15:03:31 +03:00
Fix broken example.
This commit is contained in:
parent
f08956b2ae
commit
fa2f6cf7f0
@ -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:
|
||||||
|
@ -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 })
|
||||||
|
Loading…
Reference in New Issue
Block a user