Commits

Luke Plant committed bb5a0ce

Added beginning of test files for haskelldb

Comments (0)

Files changed (2)

+module Settings where
+
+dbhost = "localhost"
+dbname = "hdb_test_db"
+dbusername = "tester"
+dbpassword = "test"
+import Database.HSQL.MySQL (connect)
+import Database.HSQL
+import Control.Exception
+import qualified Settings 
+
+sqlDebug block = catchDyn block handler	
+  where handler :: SqlError -> IO ()
+        handler err = print err
+
+main = sqlDebug (do
+    c <- connect Settings.dbhost Settings.dbname Settings.dbusername Settings.dbpassword
+    disconnect c
+    return ())