Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fetchAllRowsAL no longer converts column names to lower case

At least with Postgres and libpq,  the database will always produce
column names in lower case,  unless the column name is case sensitive
(in which case you don't want it converted to lower case.)
  • Loading branch information...
commit 16b4aa14e07595581495081a0d4cea76513df4e7 1 parent 5c7e15d
@lpsmith authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 Database/HDBC/Utils.hs
View
7 Database/HDBC/Utils.hs
@@ -39,7 +39,6 @@ module Database.HDBC.Utils where
import Database.HDBC.Types
import qualified Data.Map as Map
import Control.Exception
-import Data.Char
import System.IO.Unsafe
import Data.List(genericLength)
@@ -231,8 +230,7 @@ fetchRowAL sth =
do row <- fetchRow sth
case row of
Nothing -> return Nothing
- Just r -> do names_raw <- getColumnNames sth
- let names = map (map toLower) names_raw
+ Just r -> do names <- getColumnNames sth
return $ Just $ zip names r
{- | Strict version of 'fetchRowAL' -}
@@ -268,8 +266,7 @@ row, return an association list for each row, from column name to value.
See 'fetchRowAL' for more details. -}
fetchAllRowsAL :: Statement -> IO [[(String, SqlValue)]]
fetchAllRowsAL sth =
- do names_raw <- getColumnNames sth
- let names = map (map toLower) names_raw
+ do names <- getColumnNames sth
rows <- fetchAllRows sth
return $ map (zip names) rows
Please sign in to comment.
Something went wrong with that request. Please try again.