Name: Takusen
Version: 0.8
License: BSD3
Licensefile: LICENSE
Author: Alistair Bayley, Oleg Kiselyov
Copyright: 20032007, Alistair Bayley, Oleg Kiselyov
Maintainer: alistair@abayley.org, oleg@pobox.com
Stability: experimental
Homepage: http://darcs.haskell.org/takusen
Packageurl: http://darcs.haskell.org/takusen
Category: Database
Buildtype: Custom
CabalVersion: >= 1.2
Synopsis: Database library with leftfold interface, for PostgreSQL, Oracle, SQLite, ODBC.
Description:
Takusen is a DBMS access library. Like HSQL, we support
arbitrary SQL statements (currently strings, extensible to anything
that can be converted to a string).
.
Takusen's unique selling point is safety and efficiency.
We statically ensure all acquired database resources such
as cursors, connections, and statement handles are released, exactly
once, at predictable times. Takusen can avoid loading the whole result
set in memory, and so can handle queries returning millions of rows in
constant space. Takusen also supports automatic marshalling and
unmarshalling of results and query parameters. These benefits come
from the design of query result processing around a leftfold
enumerator.
.
Currently we fully support ODBC, Oracle, Sqlite, and PostgreSQL.
flag odbc
flag oracle
flag postgres
flag sqlite
Library
Exposedmodules:
Database.Enumerator
, Database.InternalEnumerator
, Database.Util
, Database.Stub.Enumerator
If flag(odbc)
Exposedmodules:
Database.ODBC.Enumerator
, Database.ODBC.OdbcFunctions
If os(windows)
extralibraries: odbc32
Else
extralibraries: odbc
If flag(oracle)
Exposedmodules:
Database.Oracle.Enumerator
, Database.Oracle.OCIConstants
, Database.Oracle.OCIFunctions
BuildTools: sqlplus
If flag(postgres)
Exposedmodules:
Database.PostgreSQL.Enumerator
, Database.PostgreSQL.PGFunctions
BuildTools: "pgconfig"
ExtraLibraries: pq
If flag(sqlite)
Exposedmodules:
Database.Sqlite.Enumerator
, Database.Sqlite.SqliteFunctions
If os(windows)
BuildTools: sqlite3
else
PkgConfigDepends: sqlite3
BuildTools: sqlite3
BuildDepends: base, mtl, time, oldtime
Othermodules:
Control.Exception.MonadIO
, Foreign.C.UTF8
GhcProfOptions: prof autoall
Extensions: CPP
odbcConfigProgram = simpleProgram "odbc_config"
sqlplusProgram = simpleProgram "sqlplus"
pgConfigProgram = (simpleProgram "pgconfig") {
programFindLocation = findProgramOnPath "pg_config"
}
sqlite3Program = simpleProgram "sqlite3"
main :: IO ()
main = defaultMainWithHooks defaultUserHooks {
hookedPrograms = [pgConfigProgram
,sqlite3Program
,sqlplusProgram],
preConf=preConf,
postConf=postConf
}
where
...