From: Kei H. <ex8...@gm...> - 2012-04-17 08:44:21
|
Hi. I want to report a bug. Sorry, not to use trac tickets. I couldn't receive trac's address verification mails. I'm trying haskelldb-hdbc-2.1.0 with HDBC-2.3.1. I noticed HDBC's new versions no longer converts column names to lower case https://github.com/hdbc/hdbc/commit/23f82c23d41ec11decff0c3851fedc1437a7ef28 which breaks hdbcGetValue in Database/HaskellDB/HDBC.hs . I made a small naive patch to avoid this problem below this. Regards. --- haskelldb-hdbc-2.1.0.orig/Database/HaskellDB/HDBC.hs +++ haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs @@ -171,8 +171,14 @@ hdbcPrimQuery conn sql scheme rel = do stmt <- handleSqlError $ HDBC.prepare conn sql handleSqlError $ HDBC.execute stmt [] - rows <- HDBC.fetchAllRowsMap stmt - mapM (getRec hdbcGetInstances rel scheme) rows + rows <- fetchLowerAllRowsAL stmt + mapM (getRec hdbcGetInstances rel scheme) $ map Map.fromList rows + where fetchLowerAllRowsAL sth = + do names <- map wordToLower `fmap` getColumnNames sth + rows <- fetchAllRows sth + return $ map (zip names) rows + wordToLower = map toLower + -- | Primitive execute hdbcPrimExecute :: (IConnection conn) => conn -- ^ Database connection. |
From: Justin B. <jgb...@gm...> - 2012-04-17 23:59:57
|
Thanks for your bug report and patch. I will apply it as soon as I can, but that might be a while. If you wish to submit a patch that rolls the version number of haskell-hdbc and updates the dependency on HDBC, I'd be glad to apply it right away. Out of curiousity, how are you using HaskellDB? How did you find it?/ On Tue, Apr 17, 2012 at 1:26 AM, Kei HIBINO <ex8...@gm...> wrote: > > Hi. > > I want to report a bug. > > Sorry, not to use trac tickets. > I couldn't receive trac's address verification mails. > > I'm trying haskelldb-hdbc-2.1.0 with HDBC-2.3.1. > I noticed HDBC's new versions no longer converts column names to lower case > > https://github.com/hdbc/hdbc/commit/23f82c23d41ec11decff0c3851fedc1437a7ef28 > > which breaks hdbcGetValue in Database/HaskellDB/HDBC.hs . > I made a small naive patch to avoid this problem below this. > > Regards. > > > > --- haskelldb-hdbc-2.1.0.orig/Database/HaskellDB/HDBC.hs > +++ haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs > @@ -171,8 +171,14 @@ hdbcPrimQuery conn sql scheme rel = > do > stmt <- handleSqlError $ HDBC.prepare conn sql > handleSqlError $ HDBC.execute stmt [] > - rows <- HDBC.fetchAllRowsMap stmt > - mapM (getRec hdbcGetInstances rel scheme) rows > + rows <- fetchLowerAllRowsAL stmt > + mapM (getRec hdbcGetInstances rel scheme) $ map Map.fromList rows > + where fetchLowerAllRowsAL sth = > + do names <- map wordToLower `fmap` getColumnNames sth > + rows <- fetchAllRows sth > + return $ map (zip names) rows > + wordToLower = map toLower > + > > -- | Primitive execute > hdbcPrimExecute :: (IConnection conn) => conn -- ^ Database connection. |
From: Kei H. <ex8...@gm...> - 2012-04-18 06:59:32
|
In the message "Re: HDBC >= 2.2.7.0 breaks haskelldb-hdbc " <CABPxb2=k=u3G...@ma...> Justin Bailey wrote: > Thanks for your bug report and patch. I will apply it as soon as I > can, but that might be a while. > If you wish to submit a patch that rolls the version number of > haskell-hdbc and updates the dependency on HDBC, I'd be glad to apply > it right away. I appreciate your consideration. I think this change is portable for older HDBC versions too. > Out of curiousity, how are you using HaskellDB? How did you find it?/ I'm using IBM DB2 client driver over unixODBC with haskelldb-hdbc-odbc. Default behavior of DB2 river returns upper-case field names. So, my database accessing code raised "No such field" error :) > On Tue, Apr 17, 2012 at 1:26 AM, Kei HIBINO <ex8...@gm...> wrote: > > > > Hi. > > > > I want to report a bug. > > > > Sorry, not to use trac tickets. > > I couldn't receive trac's address verification mails. > > > > I'm trying haskelldb-hdbc-2.1.0 with HDBC-2.3.1. > > I noticed HDBC's new versions no longer converts column names to lower case > > > > https://github.com/hdbc/hdbc/commit/23f82c23d41ec11decff0c3851fedc1437a7ef28 > > > > which breaks hdbcGetValue in Database/HaskellDB/HDBC.hs . > > I made a small naive patch to avoid this problem below this. > > > > Regards. > > > > > > > > --- haskelldb-hdbc-2.1.0.orig/Database/HaskellDB/HDBC.hs > > +++ haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs > > @@ -171,8 +171,14 @@ hdbcPrimQuery conn sql scheme rel = > > do > > stmt <- handleSqlError $ HDBC.prepare conn sql > > handleSqlError $ HDBC.execute stmt [] > > - rows <- HDBC.fetchAllRowsMap stmt > > - mapM (getRec hdbcGetInstances rel scheme) rows > > + rows <- fetchLowerAllRowsAL stmt > > + mapM (getRec hdbcGetInstances rel scheme) $ map Map.fromList rows > > + where fetchLowerAllRowsAL sth = > > + do names <- map wordToLower `fmap` getColumnNames sth > > + rows <- fetchAllRows sth > > + return $ map (zip names) rows > > + wordToLower = map toLower > > + > > > > -- | Primitive execute > > hdbcPrimExecute :: (IConnection conn) => conn -- ^ Database connection. |
From: Kei H. <ex8...@gm...> - 2012-10-11 04:31:35
Attachments:
normalize-field.diff
|
Hi, I updated a bugfix patch previously sent one. ([Subject: HDBC >= 2.2.7.0 breaks haskelldb-hdbc] http://sourceforge.net/mailarchive/message.php?msg_id=29139981) Updated patch is attached in this message as 'normalize-field.diff' I want to use fixed codes from Debian systems. Please tell me if there is anything I can do. I have checked repository (http://code.haskell.org/haskelldb) changes of haskelldb-hdbc from haskelldb-hdbc-2.1.0(newest version of haskelldb-hdbc on hackage). A little diff is found like below. Regards. diff -ubr haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs --- haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs 2012-10-10 11:32:34.788662463 +0900 +++ haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs 2012-10-09 17:33:44.000000000 +0900 @@ -55,6 +55,7 @@ dbTables = hdbcTables connection, dbDescribe = hdbcDescribe connection, dbTransaction = hdbcTransaction connection, + dbCommit = HDBC.commit connection, dbCreateDB = hdbcCreateDB gen connection, dbCreateTable = hdbcCreateTable gen connection, dbDropDB = hdbcDropDB gen connection, -- -- Kei Hibino -- ex8...@gm... -- |
From: Justin B. <jgb...@gm...> - 2012-10-11 16:19:00
|
I'm in the process of moving HaskellDB to GitHub. Please submit your patch there: https://github.com/m4dc4p/haskelldb On Wed, Oct 10, 2012 at 9:10 PM, Kei HIBINO <ex8...@gm...> wrote: > > Hi, > > I updated a bugfix patch previously sent one. > ([Subject: HDBC >= 2.2.7.0 breaks haskelldb-hdbc] > http://sourceforge.net/mailarchive/message.php?msg_id=29139981) > > Updated patch is attached in this message as 'normalize-field.diff' > > I want to use fixed codes from Debian systems. > Please tell me if there is anything I can do. > > > I have checked repository (http://code.haskell.org/haskelldb) changes of > haskelldb-hdbc from haskelldb-hdbc-2.1.0(newest version of haskelldb-hdbc on hackage). > A little diff is found like below. > > > Regards. > > > diff -ubr haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs > --- haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs 2012-10-10 11:32:34.788662463 +0900 > +++ haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs 2012-10-09 17:33:44.000000000 +0900 > @@ -55,6 +55,7 @@ > dbTables = hdbcTables connection, > dbDescribe = hdbcDescribe connection, > dbTransaction = hdbcTransaction connection, > + dbCommit = HDBC.commit connection, > dbCreateDB = hdbcCreateDB gen connection, > dbCreateTable = hdbcCreateTable gen connection, > dbDropDB = hdbcDropDB gen connection, > > -- > -- Kei Hibino > -- ex8...@gm... > -- > |
From: Kei H. <ex8...@gm...> - 2012-10-12 14:21:39
|
In the message "Re: HDBC >= 2.2.7.0 breaks haskelldb-hdbc " <CAB...@ma...> Justin Bailey wrote: > I'm in the process of moving HaskellDB to GitHub. Please submit your > patch there: > https://github.com/m4dc4p/haskelldb I forked this repository and made pull request . https://github.com/m4dc4p/haskelldb/pull/4 > On Wed, Oct 10, 2012 at 9:10 PM, Kei HIBINO <ex8...@gm...> wrote: > > > > Hi, > > > > I updated a bugfix patch previously sent one. > > ([Subject: HDBC >= 2.2.7.0 breaks haskelldb-hdbc] > > http://sourceforge.net/mailarchive/message.php?msg_id=29139981) > > > > Updated patch is attached in this message as 'normalize-field.diff' > > > > I want to use fixed codes from Debian systems. > > Please tell me if there is anything I can do. > > > > > > I have checked repository (http://code.haskell.org/haskelldb) changes of > > haskelldb-hdbc from haskelldb-hdbc-2.1.0(newest version of haskelldb-hdbc on hackage). > > A little diff is found like below. > > > > > > Regards. > > > > > > diff -ubr haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs > > --- haskelldb-hdbc-2.1.0/Database/HaskellDB/HDBC.hs 2012-10-10 11:32:34.788662463 +0900 > > +++ haskelldb/driver-hdbc/Database/HaskellDB/HDBC.hs 2012-10-09 17:33:44.000000000 +0900 > > @@ -55,6 +55,7 @@ > > dbTables = hdbcTables connection, > > dbDescribe = hdbcDescribe connection, > > dbTransaction = hdbcTransaction connection, > > + dbCommit = HDBC.commit connection, > > dbCreateDB = hdbcCreateDB gen connection, > > dbCreateTable = hdbcCreateTable gen connection, > > dbDropDB = hdbcDropDB gen connection, > > > > -- > > -- Kei Hibino > > -- ex8...@gm... > > -- > > |