From: Bjorn B. <bri...@cs...> - 2007-12-27 17:43:21
|
On Dec 21, 2007, at 18:32 , Peter Gammie wrote: > On 21/12/2007, at 11:52 PM, Bjorn Bringert wrote: > >> On Dec 21, 2007, at 17:43 , Justin Bailey wrote: >>> Things I'd like to do still: >>> >>> * Representation of foreign-key relationships (ideally extracted >>> from the DB) >> >> I believe Peter Gammie has some code for foreign key constrains. >> Peter: is that ready to be pulled into HaskellDB? > > I can email you (=3D=3D anyone who's interested) a patch that begins = down > that road. Roughly, I added support for defaults, foreign keys and > primary keys. IIRC one can create tables with those things but the > reflection is a bit weak, and the data description types are not > fantastically robust. (The fieldnames are merely strings, e.g.) > > I haven't touched it for a few months now, as I decided it was less > hassle to just use an SQL script. > > You will also need to renovate whatever DB backends you care about. > (All Haskell DB bindings I looked at act as SQL bridges and treat > tables merely as tuples.) I added some stuff to HSQL/PostgreSQL, and > can email you those patches too, if you like. (I could port those to > another <DB backend>/PostgreSQL if you can convince me there is some > advantage in doing so - HSQL seemed to be simple, stable, etc. when I > was looking into these things.) > > BTW what state is DBDirect in? I cannot compile hs-plugins (using GHC > 6.6.1) presently, and I don't know what the future holds for that. > ... I've just pushed a bunch of patches that add one DBDirect executable =20 for each driver. /Bj=F6rn |