You can subscribe to this list here.
2004 |
Jan
|
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(23) |
Jun
|
Jul
(5) |
Aug
|
Sep
(13) |
Oct
|
Nov
(10) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(18) |
Mar
|
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(1) |
Dec
(5) |
2006 |
Jan
(2) |
Feb
|
Mar
(11) |
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(3) |
Nov
(14) |
Dec
(15) |
2008 |
Jan
(13) |
Feb
(3) |
Mar
(12) |
Apr
(16) |
May
(4) |
Jun
(2) |
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
(4) |
Mar
(13) |
Apr
(22) |
May
(25) |
Jun
(2) |
Jul
(10) |
Aug
(2) |
Sep
(41) |
Oct
(5) |
Nov
(9) |
Dec
|
2010 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bjorn B. <bri...@cs...> - 2006-07-10 07:07:10
|
On Jul 9, 2006, at 11:59 PM, Matthias Radestock wrote: > Bjorn Bringert <bri...@cs...> writes: > >> I went to check what needed to be done for it, and ended up >> implementing it instead. It's in darcs now, but completely untested. >> I added a new "_in" operator. Could you give it a spin and see if it >> does the right thing? > > I slotted your version into my app and it works fine. Thanks! > > A test case should probably be added for this new operator. > > Btw, is the test code actually working at the moment? I am asking > because it uses 'genericConnect', which, afaict, no longer exists. The lack of a good working test suite (the current one is neither at =20 the moment) is one of the main reasons why there hasn't been a =20 HaskellDB release for quite a while. This would be a great project =20 for who wants to start working on HaskellDB. /Bj=F6rn |
From: Matthias R. <mat...@so...> - 2006-07-10 06:59:55
|
Bjorn, Bjorn Bringert <bri...@cs...> writes: > I went to check what needed to be done for it, and ended up > implementing it instead. It's in darcs now, but completely untested. > I added a new "_in" operator. Could you give it a spin and see if it > does the right thing? I slotted your version into my app and it works fine. Thanks! A test case should probably be added for this new operator. Btw, is the test code actually working at the moment? I am asking because it uses 'genericConnect', which, afaict, no longer exists. > If you run the connect function "outside" the runFastCGIorCGI, you > will only have one database connection set up for the life of that > process. If you want to connect once for every request, put it inside > instead. Ok. That's what I thought. > When data is committed when you use persistent connections > may vary depending on the back-end. Using "transaction" should make > sure that it's committed with any back-end. I ended up doing exactly that and it all works as expected. Matthias |
From: Bjorn B. <bri...@cs...> - 2006-07-10 00:33:56
|
On Jul 6, 2006, at 8:44 AM, Matthias Radestock wrote: > Bjorn, > > thanks for your quick response. > > Bjorn Bringert <bri...@cs...> writes: > >> t <- ... >> restrict (foldr (\x y -> t!field .=3D=3D. x .||. y) (const True) = values) > > This works fine, once I replaced the 'True' with 'False' ;) Hehe, oops. I told you it was off the top of my head... > I had a brief look at what it would take to support 'in' properly. =20 > It's > not entirely clear to me what the best approach would be. Making =20 > [Expr] > an instance of PrimExpr? I went to check what needed to be done for it, and ended up =20 implementing it instead. It's in darcs now, but completely untested. =20 I added a new "_in" operator. Could you give it a spin and see if it =20 does the right thing? > Another question: I am running some db queries inside haskell-fastcgi > and am having a hard time figuring out when db connections get > established. My program looks like this > >> main =3D dbQuery (\db -> runFastCGIorCGI $ fetch db) >> dbQuery =3D dynConnect_ "postgresql" someOptions > > where 'fetch' does CGI and DB actions (the latter with 'liftIO'). > > Does this end up establishing just *one* db connection, or one per > request? If the former, when does the data get committed? If you run the connect function "outside" the runFastCGIorCGI, you =20 will only have one database connection set up for the life of that =20 process. If you want to connect once for every request, put it inside =20= instead. When data is committed when you use persistent connections =20 may vary depending on the back-end. Using "transaction" should make =20 sure that it's committed with any back-end. /Bj=F6rn |
From: Bjorn B. <bri...@cs...> - 2006-07-05 22:39:26
|
On Jul 5, 2006, at 3:20 PM, Matthias Radestock wrote: > I want to be able to select records from a table based on a list of =20= > ids > I have been given. In SQL I would write > > SELECT ... FROM ... WHERE id IN (10,2,13,4,...) > > How do I do this in haskelldb? > > Looking at the haskelldb code and docs, it appears that the 'IN' > operator isn't implemented - it's present in PrimQuery but nothing at > the higher-levels produces it. > > Have I missed something? Is there perhaps a different way to construct > these kinds of queries? That would be a nice feature to have, but it isn't implemented at the =20= moment. You are very welcome to have a go at it and send me a patch. One workaround that I have used (I don't know why I didn't just =20 implement IN instead) is to use something like: t <- ... restrict (foldr (\x y -> t!field .=3D=3D. x .||. y) (const True) values) (not actual tested code, I just made it up since I couldn't find =20 where I had done it). That is, just use a disjunction of a bunch of =20 equalities. /Bj=F6rn |
From: Matthias R. <mat...@so...> - 2006-07-05 22:21:01
|
I want to be able to select records from a table based on a list of ids I have been given. In SQL I would write SELECT ... FROM ... WHERE id IN (10,2,13,4,...) How do I do this in haskelldb? Looking at the haskelldb code and docs, it appears that the 'IN' operator isn't implemented - it's present in PrimQuery but nothing at the higher-levels produces it. Have I missed something? Is there perhaps a different way to construct these kinds of queries? Matthias |
From: Marc W. <mar...@gm...> - 2006-03-20 18:09:54
|
On Mon, Mar 20, 2006 at 07:07:03PM +0100, Bj?rn Bringert wrote: > Marc Weber wrote: > >>I once ran into a similar problem in ghci when I had an unneccessary > >>"-lc" in the package configuration, and my libc.so was a linker script. > >Thanks a lot.. It's working like a charm now.. > What did you do to solve the problem? It'd be nice to know in case it > happens to someone else. What you've said cd MySQL (from HSQL) runhaskell Setup configure remove z from library dependencies and install again. > Yeah, you're right, the documentation needs to be updated. It's just > that noone has taken the time to do it yet. Perhaps I can do a little bit because the idea of haskelldb is that great! It's really this way: When using haskell you don't need a debugger. I love it. Just take text editor and start. No bloated gui.. nothing. When talking about quoting you have to pretty print for a particular driver then. > would be easier to read if you wrote it as: > putStrLn $ show $ (head t)!TblLang.iD Sure. That was it.. It drove me crazy.. I would be glad having some of your experience ;) Greetings Marc PS I'll try updating the examples the next days (if I understand them..) The wiki uses still genericConnect, too. |
From: <bri...@cs...> - 2006-03-20 18:00:51
|
Marc Weber wrote: >>I once ran into a similar problem in ghci when I had an unneccessary=20 >>"-lc" in the package configuration, and my libc.so was a linker script.= =20 >=20 > Thanks a lot.. It's working like a charm now.. What did you do to solve the problem? It'd be nice to know in case it=20 happens to someone else. > I have some suggestions.. I don't know wether you've already thought > about this? >=20 > The example still use genericConnect (which seems to be dynConnnect > ,now)... Yeah, you're right, the documentation needs to be updated. It's just=20 that noone has taken the time to do it yet. > One thing I checked for (because I had this problem some years ago usin= g > different databases) is quoting that they use different quoting. It too= k > me some time to realize that this is not implemented (I've grepped the > whole source many times for ` and [. beeing used by MySQL and MS > Access. So by now it's not possible to use whitespaces in field names. >=20 > Databases have additional functions. Such as adding dates, random > numbers (what the hell there might be) String functions (might be done > in haskell.. What might be faster?).. Would be really unbeatable to > have some kind of abstraction here, too. Unfortunately I'm not familiar > enough with the code, yet. There is currently no support for additional features or idiosyncracies=20 of individual database systems. It has been talked about in the past,=20 but not implemented. As you mention, there are two different issues here: - Different handling of stuff that should be supported by the core=20 HaskellDB interface. e.g. quoting, limiting the number of query results,=20 etc. - Extra features supported by some system, e.g. extra built-in=20 functions, special types. I think that the former should be handled by some customized SQL=20 generation for each backend. This should be allowed to be independent of=20 the driver used, since with for example ODBC we can't know what system=20 we are talking to. The latter might be handled by having modules extending the basic=20 HaskellDB interface, adding the extra features. > I'm still trying to get everything to work. > Is this correct=20 > myquery=3Ddo -- << query works find > t<-Q.table TblLang.languages > return t >=20 > main=3Ddo > t <- connect $ \db -> query db myquery > (\r -> (putStrLn.show) r!TblLang.iD) (GHC.List.head t) -- << here man= y errors after trying to only get field TblLang.iD > mapM_ (putStrLn . show) t -- showing all works fine The problem seems to be with the middle line. I think that you are only=20 really missing a pair of parantheses around r!TblLang.iD. Note that=20 function application binds harder than the ! operator. I think this line=20 would be easier to read if you wrote it as: putStrLn $ show $ (head t)!TblLang.iD > errors: (copied from vim) > test2.hs|34| 26: > || No instance for (Select (Attr StoreDatabase.Languages.ID Int) > || (IO ()) > || (IO a)) > arising from use of `!' at test2.hs|34| 26 > || Probable fix: > || add an instance declaration for (Select (Attr StoreDatabase.La= nguages.ID > || Int) > || (IO ()) > || (IO a)) > || In a lambda abstraction: > || \ r -> ((putStrLn . show) r) ! StoreDatabase.Languages.iD > || In a 'do' expression: > || (\ r -> ((putStrLn . show) r) > || ! StoreDatabase.Languages.iD) (GHC.List.head t) > || In the definition of `main': > || main =3D do > || t <- connect $ (\ db -> query db myquery) > || (\ r -> ((putStrLn . show) r) > || ! StoreDatabase.Languages.iD) (GHC.List.head t) > || mapM_ (putStrLn . show) t >=20 > Does this mean I've forgotton to import a module? > i've tried adding all exposed modules (ghc-pkg describe haskelldb) > Same result. > Do you have again some hints? If it were a missing imports problem, you would probably get errors=20 about missing identifiers. The unreadable error message that you got looks that bad because we had=20 to invent our own record types. /Bj=F6rn |
From: Marc W. <mar...@gm...> - 2006-03-20 17:34:58
|
> I once ran into a similar problem in ghci when I had an unneccessary > "-lc" in the package configuration, and my libc.so was a linker script. Thanks a lot.. It's working like a charm now.. I have some suggestions.. I don't know wether you've already thought about this? The example still use genericConnect (which seems to be dynConnnect ,now)... One thing I checked for (because I had this problem some years ago using different databases) is quoting that they use different quoting. It took me some time to realize that this is not implemented (I've grepped the whole source many times for ` and [. beeing used by MySQL and MS Access. So by now it's not possible to use whitespaces in field names. Databases have additional functions. Such as adding dates, random numbers (what the hell there might be) String functions (might be done in haskell.. What might be faster?).. Would be really unbeatable to have some kind of abstraction here, too. Unfortunately I'm not familiar enough with the code, yet. I'm still trying to get everything to work. Is this correct myquery=do -- << query works find t<-Q.table TblLang.languages return t main=do t <- connect $ \db -> query db myquery (\r -> (putStrLn.show) r!TblLang.iD) (GHC.List.head t) -- << here many errors after trying to only get field TblLang.iD mapM_ (putStrLn . show) t -- showing all works fine errors: (copied from vim) test2.hs|34| 26: || No instance for (Select (Attr StoreDatabase.Languages.ID Int) || (IO ()) || (IO a)) arising from use of `!' at test2.hs|34| 26 || Probable fix: || add an instance declaration for (Select (Attr StoreDatabase.Languages.ID || Int) || (IO ()) || (IO a)) || In a lambda abstraction: || \ r -> ((putStrLn . show) r) ! StoreDatabase.Languages.iD || In a 'do' expression: || (\ r -> ((putStrLn . show) r) || ! StoreDatabase.Languages.iD) (GHC.List.head t) || In the definition of `main': || main = do || t <- connect $ (\ db -> query db myquery) || (\ r -> ((putStrLn . show) r) || ! StoreDatabase.Languages.iD) (GHC.List.head t) || mapM_ (putStrLn . show) t Does this mean I've forgotton to import a module? i've tried adding all exposed modules (ghc-pkg describe haskelldb) Same result. Do you have again some hints? Marc |
From: <bri...@cs...> - 2006-03-19 22:19:10
|
Marc Weber wrote: > I get this error after having compiled DB Direct with. > Glasgow Haskell Compiler, Version 6.5.20060117, for Haskell 98, compile= d > by GHC version 6.5.20060117 > with latest hs-plugins (from darcs) > with cmdline : ghc -lz -fallow-undecidable-instances -fglasgow-exts --= make -package > haskelldb DBDirect.hs (alos tried without -lz) >=20 > ./DBDirect fM mysql "serve > r=3Dlocalhost db=3Dstore uid=3Dmarc pwd=3D" > DB/Direct: Daan Leijen (c) 1999, HWT (c) 2003-2004, > Bjorn Bringert (c) 2005 >=20 > Connecting to database... > DBDirect: user error (loadShared: couldn't load > `/usr/lib/libz.so' because /usr/lib/libz.so: invalid > ELF header >=20 > What might cause this error? > Do you know how to fix it? I once ran into a similar problem in ghci when I had an unneccessary=20 "-lc" in the package configuration, and my libc.so was a linker script.=20 I'm guessing that this is the same, since DBDirect uses hs-plugins to=20 load a module which requires libz. Maybe you could try loading the HSQL=20 MySQL module into ghci and see if you get the same problem. If you do,=20 maybe you could try to remove libz from the extra-libraries list in the=20 package configuration for hsql-mysql. /Bj=F6rn |
From: Marc W. <mar...@gm...> - 2006-03-19 04:30:08
|
I get this error after having compiled DB Direct with. Glasgow Haskell Compiler, Version 6.5.20060117, for Haskell 98, compiled by GHC version 6.5.20060117 with latest hs-plugins (from darcs) with cmdline : ghc -lz -fallow-undecidable-instances -fglasgow-exts --make -package haskelldb DBDirect.hs (alos tried without -lz) ./DBDirect fM mysql "serve r=localhost db=store uid=marc pwd=" DB/Direct: Daan Leijen (c) 1999, HWT (c) 2003-2004, Bjorn Bringert (c) 2005 Connecting to database... DBDirect: user error (loadShared: couldn't load `/usr/lib/libz.so' because /usr/lib/libz.so: invalid ELF header What might cause this error? Do you know how to fix it? |
From: Roberto P. <rob...@gm...> - 2006-03-15 15:22:27
|
Bjorn Bringert ha scritto: > Roberto Pariset wrote: >=20 >> Hello, >> haskelldb fails to build from source on debian-amd64, with a lot of >> errors >> like: " undefined reference to `stg_ap_p_ret' ", as shown at [1]. >> I have to say I have never heard of haskell before, so I was wondering= if >> you could give me any hint to fix it. A good starting point would be >> pointing me where stg_ap_p_ret is defined, as I haven't been able to f= ind >> out (am I unable to use google?). All the best, >> Roberto >> >> >> PS. please include me in your replies, don't just mail the list! >> >> >> >> [1] >> http://amd64.ftbfs.de/fetch.php?&pkg=3Dghc6&ver=3D6.4.1-2&arch=3Damd64= &stamp=3D1141531193&file=3Dlog&as=3Draw >> >=20 >=20 > Hi Roberto, >=20 > the log that you link to seems to be for the GHC build, not HaskellDB, > and it doesn't seem to contain the error messages that you mention. I > did find the HaskellDB log with the errors at: > http://amd64.ftbfs.de/fetch.php?&pkg=3Dhaskelldb&ver=3D0.9.cvs.601-9&ar= ch=3Damd64&stamp=3D1142372938&file=3Dlog&as=3Draw >=20 >=20 > I think that the stg_ap_p_ret function belongs to the GHC run-time > system, but I don't know what would cause the linker to not find it. >=20 > /Bj=F6rn (HaskellDB maintainer) >=20 Thanks a lot, Bj=F6rn. I confirm I got the url wrong, sorry. Now, let's hope to hear some feedback from the GHC guys =3D) Rob |
From: Bjorn B. <bri...@cs...> - 2006-03-15 15:03:37
|
Roberto Pariset wrote: > Hello, > haskelldb fails to build from source on debian-amd64, with a lot of err= ors > like: " undefined reference to `stg_ap_p_ret' ", as shown at [1]. > I have to say I have never heard of haskell before, so I was wondering = if > you could give me any hint to fix it. A good starting point would be > pointing me where stg_ap_p_ret is defined, as I haven't been able to fi= nd > out (am I unable to use google?). All the best, > Roberto >=20 >=20 > PS. please include me in your replies, don't just mail the list! >=20 >=20 >=20 > [1] > http://amd64.ftbfs.de/fetch.php?&pkg=3Dghc6&ver=3D6.4.1-2&arch=3Damd64&= stamp=3D1141531193&file=3Dlog&as=3Draw Hi Roberto, the log that you link to seems to be for the GHC build, not HaskellDB,=20 and it doesn't seem to contain the error messages that you mention. I=20 did find the HaskellDB log with the errors at: http://amd64.ftbfs.de/fetch.php?&pkg=3Dhaskelldb&ver=3D0.9.cvs.601-9&arch= =3Damd64&stamp=3D1142372938&file=3Dlog&as=3Draw I think that the stg_ap_p_ret function belongs to the GHC run-time=20 system, but I don't know what would cause the linker to not find it. /Bj=F6rn (HaskellDB maintainer) |
From: Roberto P. <rob...@gm...> - 2006-03-15 11:35:25
|
Hello, haskelldb fails to build from source on debian-amd64, with a lot of errors like: " undefined reference to `stg_ap_p_ret' ", as shown at [1]. I have to say I have never heard of haskell before, so I was wondering if you could give me any hint to fix it. A good starting point would be pointing me where stg_ap_p_ret is defined, as I haven't been able to find out (am I unable to use google?). All the best, Roberto PS. please include me in your replies, don't just mail the list! [1] http://amd64.ftbfs.de/fetch.php?&pkg=ghc6&ver=6.4.1-2&arch=amd64&stamp=1141531193&file=log&as=raw |
From: Bjorn B. <bri...@cs...> - 2006-03-11 12:29:42
|
jer...@li... wrote: > Hello, >=20 > I am sending this via webmail, so hopefully it comes through ok :p >=20 > The Read (Record r) instance seems to be broken. It works fine if you a= re > reading *just* a (Record r), but you have a data type that includes a > (Record r), such as a list, [(Record r)], then it fails. >=20 > I believe this is because readsReadRecRow is not returning the unused > portion of the string. So, in the list example, the ] that closes the l= ist > gets thrown away, resulting in the read of the list failing. >=20 > This version works better for me, in my 30 seconds of testing: >=20 >=20 >>readsReadRecRow :: ReadRecRow r =3D> ReadS r >>readsReadRecRow s =3D [(r,leftOver) | (l,leftOver) <- reads s, (r,[]) <= - >=20 > readRecRow l] >=20 > Here is the test I use -- it just does a 'show' on all the rows in a > table, and then tries to 'read' them back. >=20 >=20 >>test =3D >> mysqlConnect (MySQLOptions "host" "db" "user" "passwd" ) $ \db -> >> query db (table testTable) >>=3D \(r :: t) -> print (read (show r) :: = t) >=20 >=20 > Jeremy Shaw. Thanks! The old version was weird, I guess noone ever tried to use it=20 for anything serious. I've pushed the patch to the main repo. > ps. I darcs send'd the patch directly to the list, but it had > my non-subscribed email, so it is in the moderation queue. You can > ignore that version as the version attached to this message is the same > thing. This one apparantely wasn't accepted either, but I've now added both=20 your addresses to the accept list. > ... /Bj=F6rn |
From: <jer...@li...> - 2006-03-11 06:04:39
|
Hello, I am sending this via webmail, so hopefully it comes through ok :p The Read (Record r) instance seems to be broken. It works fine if you are reading *just* a (Record r), but you have a data type that includes a (Record r), such as a list, [(Record r)], then it fails. I believe this is because readsReadRecRow is not returning the unused portion of the string. So, in the list example, the ] that closes the list gets thrown away, resulting in the read of the list failing. This version works better for me, in my 30 seconds of testing: > readsReadRecRow :: ReadRecRow r => ReadS r > readsReadRecRow s = [(r,leftOver) | (l,leftOver) <- reads s, (r,[]) <- readRecRow l] Here is the test I use -- it just does a 'show' on all the rows in a table, and then tries to 'read' them back. > test = > mysqlConnect (MySQLOptions "host" "db" "user" "passwd" ) $ \db -> > query db (table testTable) >>= \(r :: t) -> print (read (show r) :: t) Jeremy Shaw. ps. I darcs send'd the patch directly to the list, but it had my non-subscribed email, so it is in the moderation queue. You can ignore that version as the version attached to this message is the same thing. ---------------------------- Original Message ---------------------------- Subject: darcs patch: fix Read (Record r) From: je...@n-... Date: Fri, March 10, 2006 9:48 pm To: jer...@li... -------------------------------------------------------------------------- Fri Mar 10 21:37:29 PST 2006 je...@n-... * fix Read (Record r) Previously, readsReadRecRow did not return the unconsumed portion of the string, it just threw it away. This meant that you could read a single (Record r), but you could not read a (Record r) that was inside another data type, eg [(Record r)]. This patch, hopefully, fixes the problem. I have not tested it extensively yet. |
From: <je...@n-...> - 2006-03-11 05:49:09
|
Fri Mar 10 21:37:29 PST 2006 je...@n-... * fix Read (Record r) Previously, readsReadRecRow did not return the unconsumed portion of the = string, it just threw it away. This meant that you could read a single = (Record r), but you could not read a (Record r) that was inside another data type, eg [(Record r)]. = This patch, hopefully, fixes the problem. I have not tested it = extensively yet. |
From: <bri...@cs...> - 2006-01-15 11:20:14
|
Toby Allsopp wrote: > Sun Jan 15 11:55:47 NZDT 2006 Toby Allsopp <to...@mi...> > * Fix fetching of columns with upper-case letters in their names > When looking up columns by name, convert the column name to lower cas= e because > HDBC does that also. >=20 > ... Thanks, applied and pushed. /Bj=F6rn |
From: Toby A. <to...@mi...> - 2006-01-14 23:08:09
|
Sun Jan 15 11:55:47 NZDT 2006 Toby Allsopp <to...@mi...> * Fix fetching of columns with upper-case letters in their names When looking up columns by name, convert the column name to lower case be= cause HDBC does that also. |
From: <bri...@cs...> - 2005-12-22 09:14:11
|
Ian Zimmerman wrote: > itz@unicorn:~/src/haskelldb$ runghc Setup.hs configure --ghc > *** Exception: Line 8: Parse of field 'extensions' failed > itz@unicorn:~/src/haskelldb$ dpkg --list ghc6 > Desired=3DUnknown/Install/Remove/Purge/Hold > | Status=3DNot/Installed/Config-files/Unpacked/Failed-config/Half-insta= lled > |/ Err?=3D(none)/Hold/Reinst-required/X=3Dboth-problems (Status,Err: up= percase=3Dbad) > ||/ Name Version Description > +++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ii ghc6 6.4-4.1 GHC - the Glasgow H= askell Compilation system >=20 >=20 Short version: upgrade Cabal. Longer version: HSQL 1.7 requires a newer Cabal version that that included with GHC 6.4.=20 I wanted HaskellDB to build with the same version of Cabal as HSQL=20 needs. Unfortunately the AllowUndecidableInstances extension is called=20 UndecidableInstances in recent Cabal versions. Thus I had to change=20 "AllowUndecidableInstances" to "UndecidableInstances" in the extensions=20 field. So, either you can upgrade Cabal, which you need to do for HSQL anyway,=20 our you can change the extensions fields in the Cabal files to work=20 with older Cabal versions: $ perl -pi -e 's/UndecidableInstances/AllowUndecidableInstances/' \ *.cabal driver-*/*.cabal I wish Cabal files would be more compatible between versions, but I=20 guess that's difficult while we are still in the beginning of Cabal=20 development. I've now added a note to the INSTALL file about the Cabal version=20 requirement. /Bj=F6rn |
From: Ian Z. <nob...@gm...> - 2005-12-22 05:06:27
|
itz@unicorn:~/src/haskelldb$ runghc Setup.hs configure --ghc *** Exception: Line 8: Parse of field 'extensions' failed itz@unicorn:~/src/haskelldb$ dpkg --list ghc6 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-=======================-=======================-============================================================== ii ghc6 6.4-4.1 GHC - the Glasgow Haskell Compilation system -- A true pessimist won't be discouraged by a little success. |
From: <bri...@cs...> - 2005-12-18 22:39:50
|
Tomasz Zielonka wrote: > On Sun, Dec 18, 2005 at 12:08:57AM +0100, Bj=C3=B6rn Bringert wrote: >=20 >>after swearing at CVS for a while when trying to start working with=20 >>HaskellDB again, I set up a Darcs repo on cvs.haskell.org instead. Get=20 >>your copy with: >> >>darcs get http://cvs.haskell.org/darcs/haskelldb/ >> >>I intend to use this repo for all my future work on HaskellDB. I hope=20 >>those of you who are interested in contributing will do the same. At th= e=20 >>moment the repo is only writable by me. If anyone else wants write=20 >>access, let me know. >=20 >=20 > Great! >=20 >=20 >>Does anyone know what the story is for setting up write access for=20 >>multiple developers to darcs repos on cvs.haskell.org by the way? >=20 >=20 > Wouldn't it be better to follow the darcs' development model, where > there is a maintainer who receives patches by email and applies them > after reviewing and testing? >=20 > The amount of patches for HaskellDB will probably be quite low, > at least compared to projects like GHC or darcs. I don't mind > being wrong ;-) Yeah, I guess that's the way it will be. I just didn't want to usurp the=20 position of maintainer in case there is someone else who would like to=20 have a say in what's going on. So, until further notice, the way to contribute to HaskellDB is to send=20 me patches. To get your interest in HaskellDB back up, here are some things I've=20 worked on lately: - Fully cabalizing the whole thing, getting rid of all the=20 configure/make stuff. Seems to be finished. - Fixing the dynamic driver, which uses hs-plugins to load drivers=20 dynamically. Seems to work. - Changing DBDirect to use the dynamic driver. Done. - Changing the HSQL support to use HSQL 1.7. Some problem with=20 converting from SQL to Haskell types remaining. Not sure if it's a=20 HaskellDB or HSQL problem. This is the next thing I will look at. Some things that would be nice to do. Help is very welcome: - Adding support for the new HSQL backends, e.g. Oracle. - Creating some sort of test suite. This would really be a great help. /Bj=C3=B6rn |
From: Tomasz Z. <tom...@gm...> - 2005-12-18 11:04:14
|
On Sun, Dec 18, 2005 at 12:08:57AM +0100, Björn Bringert wrote: > after swearing at CVS for a while when trying to start working with > HaskellDB again, I set up a Darcs repo on cvs.haskell.org instead. Get > your copy with: > > darcs get http://cvs.haskell.org/darcs/haskelldb/ > > I intend to use this repo for all my future work on HaskellDB. I hope > those of you who are interested in contributing will do the same. At the > moment the repo is only writable by me. If anyone else wants write > access, let me know. Great! > Does anyone know what the story is for setting up write access for > multiple developers to darcs repos on cvs.haskell.org by the way? Wouldn't it be better to follow the darcs' development model, where there is a maintainer who receives patches by email and applies them after reviewing and testing? The amount of patches for HaskellDB will probably be quite low, at least compared to projects like GHC or darcs. I don't mind being wrong ;-) Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland |
From: <bri...@cs...> - 2005-12-17 23:08:50
|
Hi folks, after swearing at CVS for a while when trying to start working with=20 HaskellDB again, I set up a Darcs repo on cvs.haskell.org instead. Get=20 your copy with: darcs get http://cvs.haskell.org/darcs/haskelldb/ I intend to use this repo for all my future work on HaskellDB. I hope=20 those of you who are interested in contributing will do the same. At the=20 moment the repo is only writable by me. If anyone else wants write=20 access, let me know. Does anyone know what the story is for setting up write access for=20 multiple developers to darcs repos on cvs.haskell.org by the way? /Bj=F6rn |
From: Jeremy S. <jer...@li...> - 2005-11-17 20:10:24
|
Hello, I highly recommend this book[1] for anyone interested in developing next generation haskelldb: Database System Implementation Hector Garcia-Molina Jeffrey D. Ullman Jennifer Widom Prentice Hall http://www-db.stanford.edu/~ullman/dbsi.html Most of the book is not relevant to haskelldb -- BUT the first halfs of chapters 6 and 7 contain a relational algebra that: (1) works on bags instead of sets (2) supports sub queries (3) supports various joins, sorts, grouping, aggregation (4) supports bag aware query optimization The rest of the book is probably not too helpful for haskelldb development -- so you may want to visit a university library if you can... On the otherhand -- if you want to write an entire DB in haskell, it is a pretty easy, comprehensive book. Jeremy Shaw. [1] Apparently this book has been superceded -- I have not looked at "Database Systems: The Complete Book", but it appears it contains similar (perhaps better) information in chapters 5 and 16 5 Relational Algebra 5.1 An Example Database Schema 5.2 An Algebra of Relational Operations 5.2.1 Basics of Relational Algebra 5.2.2 Set Operations on Relations 5.2.3 Projection 5.2.4 Selection 5.2.5 Cartesian Product 5.2.6 Natural Joins 5.2.7 Theta-Joins 5.2.8 Combining Operations to Form Queries 5.2.9 Renaming 5.2.10 Dependent and Independent Operations 5.2.11 A Linear Notation for Algebraic Expressions 5.2.12 Exercises for Section 5.2 5.3 Relational Operations on Bags 5.3.1 Why Bags? 5.3.2 Union, Intersection, and Difference of Bags 5.3.3 Projection of Bags 5.3.4 Selection on Bags 5.3.5 Product of Bags 5.3.6 Joins of Bags 5.3.7 Exercises for Section 5.3 5.4 Extended Operators of Relational Algebra 5.4.1 Duplicate Elimination 5.4.2 Aggregation Operators 5.4.3 Grouping 5.4.4 The Grouping Operator 5.4.5 Extending the Projection Operator 5.4.6 The Sorting Operator 5.4.7 Outerjoins 5.4.8 Exercises for Section 5.4 5.5 Constraints on Relations 5.5.1 Relational Algebra as a Constraint Language 5.5.2 Referential Integrity Constraints 5.5.3 Additional Constraint Examples 5.5.4 Exercises for Section 5.5 5.6 Summary of Chapter 5 5.7 References for Chapter 5 16.2 Algebraic Laws for Improving Query Plans 16.2.1 Commutative and Associative Laws 16.2.2 Laws Involving Selection 16.2.3 Pushing Selections 16.2.4 Laws Involving Projection 16.2.5 Laws About Joins and Products 16.2.6 Laws Involving Duplicate Elimination 16.2.7 Laws Involving Grouping and Aggregation 16.2.8 Exercises for Section 16.2 |
From: Anders <ch...@dt...> - 2005-09-22 10:24:45
|
On Thu, 2005-09-22 at 08:17 +0200, Bjorn Bringert wrote: > > Hi > > > > I tried the tutorial on the haskell wiki [1] and used dbInfoToModuleF= iles > > to create the DB Layout. As described I named the Table 'MyTable' but= in > > the created file DBInfo.hs, the table was named 'myTable' (caused by = a > > call to 'checkLower' in DBSpecToDBDirect.hs). Obviously this did not = work > > with the Table that I created beforehand (with dbSpecToDatabase with = the > > original dbInfo as parameter). > > > > Is this behaviour on purpose? This would mean one could only use Tabl= e > > names that begin with lower case letters. > > > > As checkLower is also applied to Field names in DBSpecToDBDirect.hs I > > assume the same behaviour happens with Fields. > > > > [1] http://www.haskell.org/hawiki/HaskellDbTutorial >=20 > Hmm, I can't see any reason why the first letter of the table and field > names have to be lower case. Of course the Haskell identifiers for the > tables and fields have to, but not the strings with the actual field > names. >=20 > I have removed these calls to checkLower in CVS for now, can anyone she= d > any light on why they were there in the first place? Chucky: maybe you > remember? >=20 > /Bj=C3=B6rn Hmm, I am *guessing* I wanted to be consistent, so that the Haskell identifiers would always have the same name as the actual tables and fields. OTOH, it might just be a bug. :) /Chucky |