haskelldb-hdbc-sqlite3 (empty) → 0.10
raw patch · 3 files changed
+70/−0 lines, 3 filesdep +HDBCdep +HDBC-sqlite3dep +basebuild-type:Customsetup-changed
Dependencies added: HDBC, HDBC-sqlite3, base, haskell98, haskelldb, haskelldb-hdbc, mtl
Files
- Database/HaskellDB/HDBC/SQLite3.hs +44/−0
- Setup.hs +4/−0
- haskelldb-hdbc-sqlite3.cabal +22/−0
+ Database/HaskellDB/HDBC/SQLite3.hs view
@@ -0,0 +1,44 @@+-----------------------------------------------------------+-- |+-- Module : Database.HaskellDB.HDBC.SQLite3+-- Copyright : HWT Group 2003, +-- Bjorn Bringert 2005-2006+-- License : BSD-style+-- +-- Maintainer : haskelldb-users@lists.sourceforge.net+-- Stability : experimental+-- Portability : non-portable+--+-- Interface to the HDBC sqlite3 back-end.+--+-----------------------------------------------------------+module Database.HaskellDB.HDBC.SQLite3 (+ SQLiteOptions(..), sqliteConnect,+ DriverInterface(..), driver+ ) where++import Database.HaskellDB.Database+import Database.HaskellDB.HDBC+import Database.HaskellDB.DriverAPI+import Database.HaskellDB.Sql.SQLite as SQLite+import Database.HDBC.Sqlite3 (connectSqlite3) ++import System.IO++data SQLiteOptions = SQLiteOptions { + filepath :: FilePath+ }++sqliteConnect :: MonadIO m => FilePath -> (Database -> m a) -> m a+sqliteConnect path = hdbcConnect SQLite.generator (connectSqlite3 path)++sqliteConnectOpts :: MonadIO m => [(String,String)] -> (Database -> m a) -> m a+sqliteConnectOpts opts f = + do+ [a] <- getOptions ["filepath"] opts+ sqliteConnect a f++-- | This driver requires the following options: +-- "filepath"+driver :: DriverInterface+driver = defaultdriver {connect = sqliteConnectOpts}
+ Setup.hs view
@@ -0,0 +1,4 @@+#!/usr/bin/env runghc++import Distribution.Simple+main = defaultMain
+ haskelldb-hdbc-sqlite3.cabal view
@@ -0,0 +1,22 @@+Name: haskelldb-hdbc-sqlite3+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-sqlite3==1.0.1.0+Extensions: ExistentialQuantification,+ OverlappingInstances,+ UndecidableInstances,+ MultiParamTypeClasses+Synopsis: HaskellDB support for the HDBC SQLite driver.+Exposed-Modules:+ Database.HaskellDB.HDBC.SQLite3+ghc-options: -O2