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: Justin B. <jgb...@gm...> - 2009-03-20 17:07:50
|
You should write your own. There is a program included (might even be dbToDBSpec) that people always ask how to make do one thing or another. It's a lot easier to look at how that program is written and create your own for your own needs. On Thu, Mar 19, 2009 at 7:10 PM, Dean Michael Berris <mik...@gm...> wrote: > Hi Guys, > > (Sorry if there are too many questions, I can't seem to find the > answers easily anywhere else...) > > How do I make 'dbToDBSpec' create DBInfo's that don't use 'Int' but > rather just 'Integer's for numeric non-floating-point fields? > > TIA > > -- > Dean Michael Berris | Software Engineer, Friendster, Inc. > blog.cplusplus-soup.com | twitter.com/mikhailberis | > linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | > deanberris.com > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Dean M. B. <mik...@gm...> - 2009-03-20 02:11:06
|
Hi Guys, (Sorry if there are too many questions, I can't seem to find the answers easily anywhere else...) How do I make 'dbToDBSpec' create DBInfo's that don't use 'Int' but rather just 'Integer's for numeric non-floating-point fields? TIA -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Dean M. B. <mik...@gm...> - 2009-03-20 01:45:14
|
On Fri, Mar 20, 2009 at 8:04 AM, Justin Bailey <jgb...@gm...> wrote: > Check out handleSql on the HDBC documentation > > http://hackage.haskell.org/packages/archive/HDBC/2.1.0/doc/html/Database-HDBC.html#v%3AhandleSql > Thanks for the link! This definitely helps. :) -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Justin B. <jgb...@gm...> - 2009-03-20 00:04:21
|
Check out handleSql on the HDBC documentation http://hackage.haskell.org/packages/archive/HDBC/2.1.0/doc/html/Database-HDBC.html#v%3AhandleSql On Thu, Mar 19, 2009 at 5:00 PM, Dean Michael Berris <mik...@gm...> wrote: > On Fri, Mar 20, 2009 at 7:06 AM, Justin Bailey <jgb...@gm...> wrote: >> You may be able to use the error handling provided by the underlying >> library. However, that may not work. You may have more luck using >> HaskellDB to generate SQL for you, which you execute directly using >> your DB provider. That's how I've used it in the past, at least. >> > > Hmmm... not quite the answer I was looking for... But at any rate, the > program does exit with an SqlError -- I'm using the HDBC.ODBC backend, > is there a way for me to inspect that object properly at some point in > the program? > > -- > Dean Michael Berris | Software Engineer, Friendster, Inc. > blog.cplusplus-soup.com | twitter.com/mikhailberis | > linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | > deanberris.com > |
From: Dean M. B. <mik...@gm...> - 2009-03-20 00:01:03
|
On Fri, Mar 20, 2009 at 7:06 AM, Justin Bailey <jgb...@gm...> wrote: > You may be able to use the error handling provided by the underlying > library. However, that may not work. You may have more luck using > HaskellDB to generate SQL for you, which you execute directly using > your DB provider. That's how I've used it in the past, at least. > Hmmm... not quite the answer I was looking for... But at any rate, the program does exit with an SqlError -- I'm using the HDBC.ODBC backend, is there a way for me to inspect that object properly at some point in the program? -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Justin B. <jgb...@gm...> - 2009-03-19 23:06:08
|
You may be able to use the error handling provided by the underlying library. However, that may not work. You may have more luck using HaskellDB to generate SQL for you, which you execute directly using your DB provider. That's how I've used it in the past, at least. On Thu, Mar 19, 2009 at 4:00 PM, Dean Michael Berris <mik...@gm...> wrote: > Hi Guys, > > Any pointers on how I should handle errors from the queries I execute? > Does HaskellDB throw any exceptions? How should I recover from errors > that happen from within the suggested 'withDB' combinator? > > TIA > > -- > Dean Michael Berris | Software Engineer, Friendster, Inc. > blog.cplusplus-soup.com | twitter.com/mikhailberis | > linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | > deanberris.com > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Dean M. B. <mik...@gm...> - 2009-03-19 23:00:15
|
Hi Guys, Any pointers on how I should handle errors from the queries I execute? Does HaskellDB throw any exceptions? How should I recover from errors that happen from within the suggested 'withDB' combinator? TIA -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Dean M. B. <mik...@gm...> - 2009-03-19 15:48:26
|
On Thu, Mar 19, 2009 at 11:39 PM, Justin Bailey <jgb...@gm...> wrote: > You want to add old-time as a dependency in the cabal file for > haskelldb-hsql. Word of caution - hsql isn't very well maintained, I dont > think. You are better going with HDBC. > Thanks. So I have to hack it manually? My problem with ODBC in general is that I've been running into problems where the MySQL ODBC driver doesn't do auto-reconnection properly. Explicitly opening and closing connections causes my Haskell application to crash for some reason with a segmentation fault. Debugging ODBC errors is no fun too, so that's why I'm looking around for an alternative. Thanks again, hopefully I can get that to work somehow and see if I get farther with HSQL instead of HDBC. -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Justin B. <jgb...@gm...> - 2009-03-19 15:39:23
|
You want to add old-time as a dependency in the cabal file for haskelldb-hsql. Word of caution - hsql isn't very well maintained, I dont think. You are better going with HDBC. On Thu, Mar 19, 2009 at 8:08 AM, Dean Michael Berris <mik...@gm... > wrote: > Hi Guys, > > I get this when I do 'cabal install haskelldb-hsql': > > Resolving dependencies... > [1 of 1] Compiling Main ( > /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/Setup.hs, > /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/dist/setup/Main.o ) > Linking /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/dist/setup/setup > ... > Configuring haskelldb-hsql-0.10... > Warning: No 'build-type' specified. If you do not need a custom Setup.hs or > ./configure script then use 'build-type: Simple'. > Preprocessing library haskelldb-hsql-0.10... > Building haskelldb-hsql-0.10... > > Database/HaskellDB/HSQL.hs:25:7: > Could not find module `System.Time': > it is a member of package old-time-1.0.0.1, which is hidden > cabal: Error: some packages failed to install: > haskelldb-hsql-0.10 failed during the building phase. The exception was: > exit: ExitFailure 1 > > Anything I can do to get this fixed? Running 'ghc-pkg describe > old-time' yields this: > > name: old-time > version: 1.0.0.1 > license: BSD3 > copyright: > maintainer: lib...@ha... > stability: > homepage: > package-url: > description: This package provides the old time library. > For new code, the new time library is recommended. > category: System > author: > exposed: True > exposed-modules: System.Time > hidden-modules: > import-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1 > library-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1 > hs-libraries: HSold-time-1.0.0.1 > extra-libraries: > extra-ghci-libraries: > include-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1/include > includes: HsTime.h > depends: base-4.0.0.0 old-locale-1.0.0.1 > hugs-options: > cc-options: > ld-options: > framework-dirs: > frameworks: > haddock-interfaces: > /usr/share/doc/ghc-6.10.1/libraries/old-time/old-time.haddock > haddock-html: /usr/share/doc/ghc-6.10.1/libraries/old-time > > Am I missing anything obvious? > > TIA > > -- > Dean Michael Berris | Software Engineer, Friendster, Inc. > blog.cplusplus-soup.com | twitter.com/mikhailberis | > linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | > deanberris.com > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Dean M. B. <mik...@gm...> - 2009-03-19 15:08:57
|
Hi Guys, I get this when I do 'cabal install haskelldb-hsql': Resolving dependencies... [1 of 1] Compiling Main ( /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/Setup.hs, /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/dist/setup/Main.o ) Linking /tmp/haskelldb-hsql-0.101938/haskelldb-hsql-0.10/dist/setup/setup ... Configuring haskelldb-hsql-0.10... Warning: No 'build-type' specified. If you do not need a custom Setup.hs or ./configure script then use 'build-type: Simple'. Preprocessing library haskelldb-hsql-0.10... Building haskelldb-hsql-0.10... Database/HaskellDB/HSQL.hs:25:7: Could not find module `System.Time': it is a member of package old-time-1.0.0.1, which is hidden cabal: Error: some packages failed to install: haskelldb-hsql-0.10 failed during the building phase. The exception was: exit: ExitFailure 1 Anything I can do to get this fixed? Running 'ghc-pkg describe old-time' yields this: name: old-time version: 1.0.0.1 license: BSD3 copyright: maintainer: lib...@ha... stability: homepage: package-url: description: This package provides the old time library. For new code, the new time library is recommended. category: System author: exposed: True exposed-modules: System.Time hidden-modules: import-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1 library-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1 hs-libraries: HSold-time-1.0.0.1 extra-libraries: extra-ghci-libraries: include-dirs: /usr/lib64/ghc-6.10.1/old-time-1.0.0.1/include includes: HsTime.h depends: base-4.0.0.0 old-locale-1.0.0.1 hugs-options: cc-options: ld-options: framework-dirs: frameworks: haddock-interfaces: /usr/share/doc/ghc-6.10.1/libraries/old-time/old-time.haddock haddock-html: /usr/share/doc/ghc-6.10.1/libraries/old-time Am I missing anything obvious? TIA -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Justin B. <jgb...@gm...> - 2009-03-18 19:34:34
|
Are you using the latest HDBC from Hackage? If not, upgrade to it and see if the problem goes away. If that doesn't help, your best bet is to go through the HDBC people - haskelldb just uses HDBC, it doesn't do anything special with it. On Wed, Mar 18, 2009 at 9:43 AM, Dean Michael Berris <mik...@gm...> wrote: > Hi, > > I've recently found out that there was a subtle issue with opening and > closing multiple connections in the same application context to the > same data source over HaskellDB.HDBC.ODBC. > > I use unix-odbc and the MySQL 5 ODBC adaptor that comes with Gentoo > Linux (updated to latest 2008 release) -- I've also upgraded to GHC > 6.10.1 and subsequently wrote an application that (by mistake > initially) created and destroyed connections to the ODBC layer. This > caused the manifestation of a segmentation fault. > > I cannot post the whole code which causes the crash, but I can try and > reproduce with another test case. > > Is this a known problem? > > Thanks and have a great day everyone. > > -- > Dean Michael Berris | Software Engineer, Friendster, Inc. > blog.cplusplus-soup.com | twitter.com/mikhailberis | > linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | > deanberris.com > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Dean M. B. <mik...@gm...> - 2009-03-18 16:43:10
|
Hi, I've recently found out that there was a subtle issue with opening and closing multiple connections in the same application context to the same data source over HaskellDB.HDBC.ODBC. I use unix-odbc and the MySQL 5 ODBC adaptor that comes with Gentoo Linux (updated to latest 2008 release) -- I've also upgraded to GHC 6.10.1 and subsequently wrote an application that (by mistake initially) created and destroyed connections to the ODBC layer. This caused the manifestation of a segmentation fault. I cannot post the whole code which causes the crash, but I can try and reproduce with another test case. Is this a known problem? Thanks and have a great day everyone. -- Dean Michael Berris | Software Engineer, Friendster, Inc. blog.cplusplus-soup.com | twitter.com/mikhailberis | linkedin.com/in/mikhailberis | profiles.friendster.com/mikhailberis | deanberris.com |
From: Michael S. <sp...@de...> - 2009-03-17 07:51:26
|
Hi there, I'm really a user of HaskellDB, but am trying to mine the source code for my own work. In reviewing the optimizations, I've stumbled upon this code: removeEmpty = foldPrimQuery (Empty, BaseTable, project, restrict, binary, group, special) where -- Messes up queries without a table, e.g. constant queries -- disabled by Bjorn Bringert 2004-04-08 --project assoc Empty = Empty project assoc query | null assoc = Empty | otherwise = Project assoc query I'm wondering this is true: My understanding of Empty is that it represents a nullary relation with a single element. (This is necessary to it can be the identity wrt. cartesian product, I think.) If that's the case, this transformation is incorrect, as `project [] query' should return as many rows as query, not just one. Or am I overlooking something? -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla |
From: Justin B. <jgb...@gm...> - 2009-02-13 23:38:07
|
I've applied your patch and uploaded a new release of HaskellDB to hackage - 0.12. I also uploaded a new release of each HDBC driver so they work with HDBC v2. Thanks Artyom for your patches in that area! 2009/2/10 Artyom Shalkhakov <art...@gm...>: > Hello, > > I have successfully built HaskellDB and it's HDBC driver (using the version in > darcs); some queries can be performed, but I noticed that sometimes MySQL > ODBC fails with strange errors ("database not selected", etc.). > > I don't know whether it's a bug in MySQL driver or not, but if one > replaces spaces > with ";" when constructing connection string out of key-value pairs, everything > works correctly. > > I can submit a patch fixing this. Is anybody interested? > > Cheers, > Artyom Shalkhakov. > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Artyom S. <art...@gm...> - 2009-02-11 08:57:35
|
Hello, 2009/2/10 Justin Bailey <jgb...@gm...>: > Please do. I have commit rights to the repo and will apply your patch ... Okay, here it is (attached). I've updated HDBC, HDBC-ODBC and HDBC-Sqlite3 backends so they compile with the latest HDBC (2.1.0 as of this writing). I haven't tested Sqlite3, though. Also, can anybody tell me why documentation is so scarce, isn't HaskellDB a good thing to use? Also, HaskellDB seems dead (like Lisp, which is dead but living :)). Cheers, Artyom Shalkhakov. |
From: Justin B. <jgb...@gm...> - 2009-02-10 15:58:52
|
Please do. I have commit rights to the repo and will apply your patch ... On Tue, Feb 10, 2009 at 3:20 AM, Artyom Shalkhakov < art...@gm...> wrote: > Hello, > > I have successfully built HaskellDB and it's HDBC driver (using the version > in > darcs); some queries can be performed, but I noticed that sometimes MySQL > ODBC fails with strange errors ("database not selected", etc.). > > I don't know whether it's a bug in MySQL driver or not, but if one > replaces spaces > with ";" when constructing connection string out of key-value pairs, > everything > works correctly. > > I can submit a patch fixing this. Is anybody interested? > > Cheers, > Artyom Shalkhakov. > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK > and > Ajax docs to start building applications today- > http://p.sf.net/sfu/adobe-com > _______________________________________________ > Haskelldb-users mailing list > Has...@li... > https://lists.sourceforge.net/lists/listinfo/haskelldb-users > |
From: Artyom S. <art...@gm...> - 2009-02-10 11:21:00
|
Hello, I have successfully built HaskellDB and it's HDBC driver (using the version in darcs); some queries can be performed, but I noticed that sometimes MySQL ODBC fails with strange errors ("database not selected", etc.). I don't know whether it's a bug in MySQL driver or not, but if one replaces spaces with ";" when constructing connection string out of key-value pairs, everything works correctly. I can submit a patch fixing this. Is anybody interested? Cheers, Artyom Shalkhakov. |
From: Laurent G. <ml...@ni...> - 2008-12-21 12:11:20
|
Thanks for your answers Justin. On Dec 15, 2008, at 18:23, Justin Bailey wrote: > On Sun, Dec 14, 2008 at 9:16 AM, Laurent Giroud <ml...@ni...> wrote: >> However, it is not possible for me to compile haskelldb-dynamic, >> which >> seems necessary to get the DBDirect program which analyzes the >> database. This is something that I inferred from my research on the >> web since the current documentation (or lack thereof) seems totally >> obsolete on that matter. > > It's probably easier to write your own "DBDirect" like program than > use the one in the distribution. I don't know if I can do that yet, but I'll give it a try if I fail to build it. >> Moreover, I also failed at building a working driver, be it for hdbc, >> hsql (which seems utterly dead and unmaintained): hdbc-odbc doesn't >> build either since Setup.hs wants to use a function which is now >> obsolete. > > I am on Windows and have used HDBC-postgres successfully with > haskelldb. Since I am on mac os x, I started with MySQL which is somehow "officially" supported by Apple, but it's a good idea indeed, I'll try it if I can't get anything to connect with MySQL. >> Are there any plan to update haskelldb so it builds again with cabal >> 1.6 and the recent versions of the modules it depends on or is this >> library not maintained anymore ? > > haskelldb hasn't seen a lot of love lately, but people do still commit > fixes. But as you have found it, it's not updated very frequently. If Do you have any idea of why people submit patches but nobody ends up updating the version on hackage ? > If > you can get it building though, it's a pretty neat library. I used it > to generate SQL queries and then executed those separately, but even > for that it was a great library. It seems to be a great library indeed, that's why I was a bit surprised to see that the hackage version did not build: it would seem to me that it was by far the most interesting of the database library available on Haskell. SQL type safety is such a great feature that I thought nobody would want to use anything but that, apparently I was wrong since the other database libraries (hdbc, takusen) seem to be more active than haskelldb is. Thanks again for your reply ! Cheers, Laurent |
From: Justin B. <jgb...@gm...> - 2008-12-15 17:23:16
|
On Sun, Dec 14, 2008 at 9:16 AM, Laurent Giroud <ml...@ni...> wrote: > However, it is not possible for me to compile haskelldb-dynamic, which > seems necessary to get the DBDirect program which analyzes the > database. This is something that I inferred from my research on the > web since the current documentation (or lack thereof) seems totally > obsolete on that matter. It's probably easier to write your own "DBDirect" like program than use the one in the distribution. > Moreover, I also failed at building a working driver, be it for hdbc, > hsql (which seems utterly dead and unmaintained): hdbc-odbc doesn't > build either since Setup.hs wants to use a function which is now > obsolete. I am on Windows and have used HDBC-postgres successfully with haskelldb. > Are there any plan to update haskelldb so it builds again with cabal > 1.6 and the recent versions of the modules it depends on or is this > library not maintained anymore ? haskelldb hasn't seen a lot of love lately, but people do still commit fixes. But as you have found it, it's not updated very frequently. If you can get it building though, it's a pretty neat library. I used it to generate SQL queries and then executed those separately, but even for that it was a great library. Justin |
From: Laurent G. <ml...@ni...> - 2008-12-15 07:51:22
|
Hi, I have been trying to build a working version of haskelldb from the packages available on hackage but couldn't manage to obtain one so far. All packages I have tried required some adaptations for ghc 6.10.1 and I managed to build the following ones: haskelldb-0.10 haskelldb-flat-0.10 haskelldb-hdbc-0.10 However, it is not possible for me to compile haskelldb-dynamic, which seems necessary to get the DBDirect program which analyzes the database. This is something that I inferred from my research on the web since the current documentation (or lack thereof) seems totally obsolete on that matter. It fails because the package depends on the plugins package which can't be build with anything but cabal 1.4. Having ghc 6.10.1 with cabal 1.6 and not enough haskell skills I am completely stuck there. It looks like installing ghc 6.8 or 6.6 with cabal 1.4 might help building everything properly but it wouldn't make much sense to work with an environment which by all standards is obsolete. Moreover, I also failed at building a working driver, be it for hdbc, hsql (which seems utterly dead and unmaintained): hdbc-odbc doesn't build either since Setup.hs wants to use a function which is now obsolete. I found that the code on http://code.haskell.org/haskelldb seems fresher than what is on hackage, but still couldn't build it... Are there any plan to update haskelldb so it builds again with cabal 1.6 and the recent versions of the modules it depends on or is this library not maintained anymore ? My haskell capabilities do not allow me to do more than fix a few cabal broken dependencies unfortunately so I'd like to know if there's still hope that these problem can be fixed. I have been advised to try other database interfaces, such as HDBC or Takusen however they are very classic SQL wrappers which bring nothing more than what I can find for C++ or any other language out there... Thanks in advance for any hints/information you might have. Regards, Laurent |
From: Justin B. <jgb...@gm...> - 2008-07-31 23:17:01
|
On Thu, Jul 10, 2008 at 12:04 AM, Henning Thielemann <has...@he...> wrote: > > SELECT C2 C > FROM (SELECT C C2 > FROM POINTS T1 > GROUP BY C2) T1 > > > But the C2 after GROUP BY does not denote a column of a table. It may be > replaced by C or the GROUP BY may be moved to the outer SELECT statement. > I've corrected this bug in the attached patch. It occurred because the defaultSqlGroup function in Database.HaskellDB.Sql.Default did not properly filter projected columns from its group by clause. I also fixed a bug in defaultSqlProject where order by columns were not added to the group by clause if they did not appear in a projection. I added a few tests for the new cases which appear to work. Any comments welcome! Justin |
From: Justin B. <jgb...@gm...> - 2008-07-31 22:25:17
|
I have run into a problem several times where I have a column that is defined as Expr BStr10 (or similar) and I want to convert it to a string column, i.e. Expr String. I came up with a class declaration and some instances that can do it, but is there a simpler way? I have (which must be defined in Query.hs since it uses the Expr constructor): class BStrToStr s d where toStr :: s -> d instance (Size n) => BStrToStr (Expr (BoundedString n)) (Expr String) where toStr (Expr e) = Expr e instance (Size n) => BStrToStr (Expr (Maybe (BoundedString n))) (Expr (Maybe String)) where toStr (Expr m) = Expr m This toy example shows the class in action. "query" will compile fine, but "queryX" will not (when uncommented). Any suggestions are welcome! Justin \begin{code} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} import Database.HaskellDB import Database.HaskellDB.DBLayout import Database.HaskellDB.Query (Expr(..)) import Database.HaskellDB.BoundedList (Size) query = do t <- table someTable project $ strField << (toStr (t ! bstrField) :: Expr String) -- Below does not compile. -- queryX = do t <- table someTable project $ strField << t ! bstrField class BStrToStr s d where toStr :: s -> d instance (Size n) => BStrToStr (Expr (BoundedString n)) (Expr String) where toStr (Expr e) = Expr e instance (Size n) => BStrToStr (Expr (Maybe (BoundedString n))) (Expr (Maybe String)) where toStr (Expr m) = Expr m type SomeTable = (RecCons StrField (Expr String) (RecCons BStrField (Expr BStr10) RecNil)) someTable :: Table SomeTable someTable = baseTable "someTable" $ hdbMakeEntry StrField # hdbMakeEntry BStrField data StrField = StrField instance FieldTag StrField where fieldName _ = "strField" strField :: Attr StrField String strField = mkAttr StrField data BStrField = BStrField instance FieldTag BStrField where fieldName _ = "bstrField" bstrField :: Attr BStrField BStr10 bstrField = mkAttr BStrField \end{code} |
From: Justin B. <jgb...@gm...> - 2008-07-30 22:37:55
|
All, Attached you'll find a patch which adds several useful Template Haskell functions to haskelldb. They are not intended to be part of the base haskelldb install, so no new dependency on TH is introduced. Instead, they are in a haskelldb-th directory under the haskelldb source distribution, similar to how the driver files are distributed. Building and installing the package is easy: cd haskelldb-th runhaskell Setup.hs configure runhaskell Setup.hs build runhaskell Setup.hs haddock runhaskell Setup.hs install Only one module is exported at this time - Database.HaskellDB.CodeGen. The functions exported are: mkField, mkFieldWithName, mkDBDirectField - Create compile-time field declarations with various levels of control over names. mkDBDirectTable, mkDBDirectTableWithName, mkDBDirectTableType -- Create compile-time table declarations and type synonyms, with various degrees of control over names or individual piece. mkRecord - Provides a simpler way to build projections from multiple tables and fields. Comments and suggestions welcome! If this patch is accepted, I will upload the package to hackage so it is available as a separate download. Of course, it depends on haskelldb 0.11, so that will need to be updated first. Justin p.s. haskelldb actually has some legacy functions in test/old/THField.hs that are similar to these, but I discovered those after I'd written mine, plus they aren't quite as robust. |
From: Justin B. <jgb...@gm...> - 2008-07-21 18:51:40
|
On Mon, Jul 21, 2008 at 11:47 AM, GrayShade <gra...@gm...> wrote: > Is there any way to do something like > order [desc t (constant date' .-. date)] > > in HaskellDB (i. e. sorting by an expression, not by a column). > There isn't. You can create a column containing the expression you'd like to sort by, though. Justin |
From: GrayShade <gra...@gm...> - 2008-07-21 18:47:28
|
Is there any way to do something like order [desc t (constant date' .-. date)] in HaskellDB (i. e. sorting by an expression, not by a column). Thanks. |