Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

expose Connection type.

--HG--
extra : convert_revision : a4e0b797e7f103859215f58a2e70fafe3cb2389d
  • Loading branch information...
commit 06ba006026a7a8682ad8edb47282d59dcbcedfb6 1 parent 6859d02
@waterson waterson authored
View
2  Database/HDBC/MySQL.hs
@@ -37,6 +37,6 @@ time zone is UTC.
-}
module Database.HDBC.MySQL
- (connectMySQL, MySQLConnectInfo(..), defaultMySQLConnectInfo)
+ (connectMySQL, MySQLConnectInfo(..), defaultMySQLConnectInfo, Connection)
where
import Database.HDBC.MySQL.Connection
View
2  Database/HDBC/MySQL/Connection.hsc
@@ -2,7 +2,7 @@
{-# OPTIONS -fglasgow-exts #-}
module Database.HDBC.MySQL.Connection
- (connectMySQL, MySQLConnectInfo(..), defaultMySQLConnectInfo)
+ (connectMySQL, MySQLConnectInfo(..), defaultMySQLConnectInfo, Connection)
where
import Control.Exception
View
9 Test.hs
@@ -4,10 +4,13 @@ import Control.Monad
import Database.HDBC
import Database.HDBC.MySQL
+connectDatabase :: IO Connection
+connectDatabase = connectMySQL defaultMySQLConnectInfo
+ { mysqlHost = "putterwell"
+ }
+
go :: IO ()
-go = do conn <- connectMySQL defaultMySQLConnectInfo
- { mysqlHost = "putterwell"
- }
+go = do conn <- connectDatabase
{-
Please sign in to comment.
Something went wrong with that request. Please try again.