HaskellDB
Dominic Steinitz
dominic.steinitz@blueyonder.co.uk
Sun, 26 Jan 2003 10:19:01 -0000
Having used HToolkit successfully to extract information from a MySQL
database, I am painfully aware of the limitations of sending embedded SQL
strings and finding out at runtime that something didn't quite work (in an
often subtle and difficult to track down way).
I'd love to be able to put HaskellDB on top of HToolkit. There are two
approaches: i) add extensible records to ghc or ii) modify HaskellDB so it
uses Haskell records not extensible records (I'd have modify HaskellDB
anyway to use HToolkit rather than talk to ODBC directly). The latter sounds
as though it might be more feasible that the former. Having read the paper
and briefly looked at the code, I assume the extensibility is required if
you have two tables each with the same column name and therefore you want to
use the same label in two different records. Obviously you can't do this
with Haskell records as the labels become top level functions. However, if I
rename labels then I won't have this problem. For example, if I have two
tables, passwd and notify each containing a column called email then I could
have labels notifyEmail and passwdEmail and remember that they really
referred to email.
Does anyone have any views on this?
Dominic Steinitz