haskelldb-hdbc-odbc (empty) → 0.10
raw patch · 3 files changed
+62/−0 lines, 3 filesdep +HDBCdep +HDBC-odbcdep +basebuild-type:Customsetup-changed
Dependencies added: HDBC, HDBC-odbc, base, haskell98, haskelldb, haskelldb-hdbc, mtl
Files
- Database/HaskellDB/HDBC/ODBC.hs +36/−0
- Setup.hs +4/−0
- haskelldb-hdbc-odbc.cabal +22/−0
+ Database/HaskellDB/HDBC/ODBC.hs view
@@ -0,0 +1,36 @@+-----------------------------------------------------------+-- |+-- Module : Database.HaskellDB.HDBC.ODBC+-- Copyright : HWT Group (c) 2003, Bjorn Bringert (c) 2006+-- License : BSD-style+-- +-- Maintainer : haskelldb-users@lists.sourceforge.net+-- Stability : experimental+-- Portability : portable+--+-----------------------------------------------------------+module Database.HaskellDB.HDBC.ODBC (+ odbcConnect,+ DriverInterface(..), driver+ ) where++import Database.HaskellDB.Database+import Database.HaskellDB.HDBC+import Database.HaskellDB.DriverAPI+import Database.HaskellDB.Sql.Generate (SqlGenerator)++import Database.HDBC.ODBC (connectODBC)++odbcConnect :: MonadIO m => SqlGenerator -> [(String,String)] -> (Database -> m a) -> m a+odbcConnect gen opts = hdbcConnect gen (connectODBC conninfo)+ where conninfo = unwords [ k ++ "=" ++ v | (k,v) <- opts]++odbcConnectOpts :: MonadIO m => [(String,String)] -> (Database -> m a) -> m a+odbcConnectOpts opts f = + do gen <- getGenerator opts+ let opts' = filter ((/="generator") . fst) opts+ odbcConnect gen opts' f++-- | This driver passes its options through to HDBC.+driver :: DriverInterface+driver = defaultdriver { connect = odbcConnectOpts }
+ Setup.hs view
@@ -0,0 +1,4 @@+#!/usr/bin/env runghc++import Distribution.Simple+main = defaultMain
+ haskelldb-hdbc-odbc.cabal view
@@ -0,0 +1,22 @@+Name: haskelldb-hdbc-odbc+Version: 0.10+Copyright: The authors+Maintainer: haskelldb-users@lists.sourceforge.net+Author: Daan Leijen, Conny Andersson, Martin Andersson, Mary Bergman, Victor Blomqvist, Bjorn Bringert, Anders Hockersten, Torbjorn Martin, Jeremy Shaw+License: BSD3+build-depends: + haskell98, + base, + mtl, + haskelldb==0.10, + haskelldb-hdbc==0.10, + HDBC==1.0.1, + HDBC-odbc==1.0.1.0+Extensions: ExistentialQuantification,+ OverlappingInstances,+ UndecidableInstances,+ MultiParamTypeClasses+Synopsis: HaskellDB support for the HDBC ODBC driver.+Exposed-Modules:+ Database.HaskellDB.HDBC.ODBC+ghc-options: -O2