From: Bjorn B. <d00...@dt...> - 2005-02-05 21:02:15
|
Frederik Eaton wrote: >>Santoemma Enrico wrote: >> >>>1) Is the library too young for a real world project? Does it work >>>with Oracle (throuhg ODBC)? >> >>There are still significant bugs in HaskellDB, see the open bugs in >>http://sourceforge.net/tracker/?group_id=3D101095&atid=3D629040 >=20 >=20 > What's the biggest bug? "No explicit grouping"? I'm not sure. AFAIK, there are no bugs which make HaskellDB generally=20 unusable, but different people will have different needs. Actually now=20 tha you mention it "No explicit grouping" feels more like a request for=20 enhancement, which are tracked by the RFE tracker at: http://sourceforge.net/tracker/?group_id=3D101095&atid=3D629043 The bugs I personally think are the worst are the high priority ones in=20 the bug tracker. > Also, it would be nice to have somewhere -- maybe in the wiki? -- some > examples of SQL queries which can be done and which can't be done in > HaskellDB. I have a program which I've started writing using regular > SQL statements, and I'm wondering if I should translate it to > HaskellDB. Something like this would help me decide. For example here > are some queries, variables with $ represent parameters... (it's a > simple flash card program) I don't have time to write the HaskellDB code for you right now, it=20 being Saturday night and all, but see the comments below. > select id from cards where cards.id not in > (select alg_data.id from alg_data) order by rand() limit 1 HaskellDB does not currently support queries in expressions, as needed=20 by the IN operator, see the RFE: http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D961869&group= _id=3D101095&atid=3D629043 There is also no rand() function, but that can quite easily be added by=20 the used. > select id from alg_data where uid =3D $uid and > when_eligible < $vt and > id like $pat order by curr_delay desc limit 1 Should be ok. > select max(show_num) from hist where (uid,id)=3D($uid,$id) Seems easy enough. > select min(a.s), avg(a.s), max(a.s), sum(a.s) from=20 > (select id,max(show_num) s from hist where=20 > uid =3D $uid and > id in (select id from alg_data where > uid=3D$uid and when_eligible < $vt) > group by id) as a IN expressions are not supported, see above. This query could be done as=20 a join instead, right? (It's saturday night, you don't expect me to=20 actually think, do you? :-P ) > P.S. Is there just the tutorial in wiki-form? Why not put the rest of > the documentation on a wiki, so people can add to it? Good idea! If you move the stuff to the wiki, I'll update the HaskellDB=20 homepage. Assuming there are no objections from anyone? > P.P.S. The test application says "Server error!"... >=20 > http://jackass.tekno.chalmers.se/dp03-7/cgi/run Eh, right. The Chalmers computer support group seems to have changed the=20 installation. I have removed the link from the homepage. Maybe we can=20 put a demo app somewhere else, or link to an existing one. Shae? /Bj=F6rn |