haskelldb-hdbc-sqlite3-2.1.2/0000755000000000000000000000000012042267650014117 5ustar0000000000000000haskelldb-hdbc-sqlite3-2.1.2/Setup.hs0000644000000000000000000000010512042267650015547 0ustar0000000000000000#!/usr/bin/env runghc import Distribution.Simple main = defaultMain haskelldb-hdbc-sqlite3-2.1.2/LICENSE0000644000000000000000000000307512042267650015131 0ustar0000000000000000Copyright (c) 1999 Daan Leijen, daan@cs.uu.nl Copyright (c) 2003-2004 The HaskellDB development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the names of the copyright holders nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. haskelldb-hdbc-sqlite3-2.1.2/haskelldb-hdbc-sqlite3.cabal0000644000000000000000000000211012042267650021306 0ustar0000000000000000Name: haskelldb-hdbc-sqlite3 Version: 2.1.2 Cabal-version: >= 1.6 Build-type: Simple Copyright: The authors Homepage: https://github.com/m4dc4p/haskelldb 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 License-file: LICENSE Synopsis: HaskellDB support for the HDBC SQLite driver. Description: HaskellDB requires this driver if HDBC will be used to connect to a SQLlite3 database. Category: Database Library Build-depends: mtl >= 1 && < 3, haskelldb >= 2 && < 3, haskelldb-hdbc >= 2 && < 3, HDBC >= 2 && < 3, HDBC-sqlite3 >= 2 && < 3, base >= 3 && < 5 Extensions: ExistentialQuantification, OverlappingInstances, UndecidableInstances, MultiParamTypeClasses Exposed-Modules: Database.HaskellDB.HDBC.SQLite3 Executable DBDirect-hdbc-sqlite3 Main-is: DBDirect.hs Source-repository head Type: git Location: https://github.com/m4dc4p/haskelldb haskelldb-hdbc-sqlite3-2.1.2/DBDirect.hs0000644000000000000000000000016012042267650016070 0ustar0000000000000000import Database.HaskellDB.HDBC.SQLite3 import Database.HaskellDB.DBDirect main :: IO () main = dbdirect driver haskelldb-hdbc-sqlite3-2.1.2/Database/0000755000000000000000000000000012042267650015623 5ustar0000000000000000haskelldb-hdbc-sqlite3-2.1.2/Database/HaskellDB/0000755000000000000000000000000012042267650017414 5ustar0000000000000000haskelldb-hdbc-sqlite3-2.1.2/Database/HaskellDB/HDBC/0000755000000000000000000000000012042267650020114 5ustar0000000000000000haskelldb-hdbc-sqlite3-2.1.2/Database/HaskellDB/HDBC/SQLite3.hs0000644000000000000000000000270212042267650021675 0ustar0000000000000000----------------------------------------------------------- -- | -- 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) options :: [(String, String)] options = ("filepath", "File path") : [] sqliteConnectOpts :: MonadIO m => [(String,String)] -> (Database -> m a) -> m a sqliteConnectOpts opts f = do [a] <- getAnnotatedOptions options opts sqliteConnect a f -- | This driver requires the following options: -- "filepath" driver :: DriverInterface driver = defaultdriver {connect = sqliteConnectOpts, requiredOptions = options}