-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTakusen.cabal
208 lines (192 loc) · 6.45 KB
/
Takusen.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
-- setup configure -fodbc -foracle -fpostgres -fsqlite
-- setup build
-- setup install
--
-- setup configure -fbuildtests
-- setup build
-- setup install
Name: Takusen
Version: 0.8.7
License: BSD3
License-file: LICENSE
Author: Alistair Bayley, Oleg Kiselyov
Copyright: 2003-2009, Alistair Bayley, Oleg Kiselyov
Stability: experimental
-- Homepage: http://code.haskell.org/takusen
-- Package-url: http://code.haskell.org/takusen
Category: Database
Build-type: Custom
Cabal-Version: >= 1.6
Synopsis: Database library with left-fold interface, for PostgreSQL, Oracle, SQLite, ODBC.
Description:
Takusen is a DBMS access library. Like HSQL and HDBC, 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 left-fold
enumerator.
.
Currently we fully support ODBC, Oracle, Sqlite, and PostgreSQL.
Extra-tmp-files:
Database/Oracle/OCIFunctions_stub.c
Database/Oracle/OCIFunctions_stub.h
Database/PostgreSQL/PGFunctions_stub.c
Database/PostgreSQL/PGFunctions_stub.h
Extra-source-files: README.txt
Flag odbc
Description: ODBC backend
Default: False
Flag oracle
Description: Oracle OCI backend
Default: False
Flag postgres
Description: PostgreSQL backend
Default: False
Flag sqlite
Description: SQLite3 backend
Default: False
Flag buildtests
Description: Build test executables
Default: False
Executable takusen_tests
If !flag(buildtests)
Buildable: False
else
-- If we want to build test exe, then it needs Takusen installed.
Build-Depends: Takusen, base, mtl, time, QuickCheck==1.*, random
Main-Is: Main.lhs
Other-modules:
Database.Enumerator
, Database.InternalEnumerator
, Database.Util
, Database.Test.Enumerator
, Database.Test.Util
, Database.Test.Performance
, Database.ODBC.Enumerator
, Database.ODBC.OdbcFunctions
, Database.ODBC.Test.Enumerator
, Database.ODBC.Test.OdbcFunctions
, Database.Oracle.Enumerator
, Database.Oracle.OCIConstants
, Database.Oracle.OCIFunctions
, Database.Oracle.Test.Enumerator
, Database.Oracle.Test.OCIFunctions
, Database.PostgreSQL.Enumerator
, Database.PostgreSQL.PGFunctions
, Database.PostgreSQL.Test.Enumerator
, Database.PostgreSQL.Test.PGFunctions
, Database.Sqlite.Enumerator
, Database.Sqlite.SqliteFunctions
, Database.Sqlite.Test.Enumerator
, Database.Sqlite.Test.SqliteFunctions
, Control.Exception.MonadIO
, Control.Exception.Extensible
, Foreign.C.UTF8
, Foreign.C.Test.UTF8
, Test.MiniUnit
-- ghc-6.6 has System.Time in base.
-- Later versions has it in a separate package.
if impl(ghc >= 6.8)
Build-Depends: old-time
Extensions: CPP DeriveDataTypeable ScopedTypeVariables
if impl(ghc>=6.9)
cpp-options: -DUSE_NEW_EXCEPTIONS
build-depends: base>=4&&<5
else
build-depends: base<4
Executable miniunit_tests
If !flag(buildtests)
Buildable: False
Main-Is: Test/Main.hs
Other-modules:
Control.Exception.MonadIO
, Control.Exception.Extensible
, Test.MiniUnit
, Test.MiniUnitTest
Build-Depends: base, mtl
Extensions: CPP DeriveDataTypeable ScopedTypeVariables
if impl(ghc>=6.9)
cpp-options: -DUSE_NEW_EXCEPTIONS
build-depends: base>=4&&<5
else
build-depends: base<4
Library
If flag(buildtests)
Buildable: False
Exposed-modules:
Database.Enumerator
, Database.Util
--, Database.Stub.Enumerator
, Control.Exception.MonadIO
, Foreign.C.UTF8
If flag(odbc)
Exposed-modules:
Database.ODBC.Enumerator
, Database.ODBC.OdbcFunctions
If os(windows)
extra-libraries: odbc32
ld-options: --enable-stdcall-fixup
Else
If os(darwin)
extra-libraries: iodbc
Else
extra-libraries: odbc
If flag(oracle)
Exposed-modules:
Database.Oracle.Enumerator
, Database.Oracle.OCIConstants
, Database.Oracle.OCIFunctions
Build-Tools: sqlplus
If os(windows)
Extra-Libraries: oci
Else
Extra-Libraries: clntsh
If flag(postgres)
Exposed-modules:
Database.PostgreSQL.Enumerator
, Database.PostgreSQL.PGFunctions
Build-Tools: pg_config
Extra-Libraries: pq
If flag(sqlite)
Exposed-modules:
Database.Sqlite.Enumerator
, Database.Sqlite.SqliteFunctions
If os(windows)
Build-Tools: sqlite3
else
PkgConfig-Depends: sqlite3
Build-Tools: sqlite3
Extra-Libraries: sqlite3
Build-Depends: base, mtl, time
-- ghc-6.6 has System.Time in base.
-- Later versions has it in a separate package.
if impl(ghc >= 6.8)
Build-Depends: old-time
-- Many modules use CPP to switch between new and old exceptions.
-- DeriveDataTypeable is because we can't switch it on/off with #define;
-- for ghc-6.6 it is rendered as -fglasgow-exts anyway.
Extensions: CPP DeriveDataTypeable
-- We need the USE_NEW_EXCEPTIONS flag as this is used in
-- Control.Exception.Extensible is choose between defining our own
-- extensible exceptions, or re-exporting what's in base-4.
if impl(ghc>=6.9)
cpp-options: -DUSE_NEW_EXCEPTIONS
build-depends: base>=4&&<5
else
build-depends: base<4
if impl(ghc >= 6.10)
-- doesn't work with Data.Time on older ghcs, due to some missing header file
Ghc-Options: -O2
Other-modules:
Database.InternalEnumerator
, Control.Exception.Extensible
-- Modules in Other-modules are passed to Haddock with --hide=<module-name>.
Ghc-Prof-Options: -prof -auto-all