HDBC 2.3.1.2 → 2.4.0.0
raw patch · 4 files changed
+19/−71 lines, 4 filesdep ~basedep ~bytestringdep ~containers
Dependency ranges changed: base, bytestring, containers, convertible, mtl, old-locale, old-time, text, time, utf8-string
Files
- Database/HDBC/ColTypes.hs +4/−21
- Database/HDBC/SqlValue.hs +6/−24
- Database/HDBC/Statement.hs +2/−6
- HDBC.cabal +7/−20
Database/HDBC/ColTypes.hs view
@@ -12,6 +12,7 @@ Written by John Goerzen, jgoerzen\@complete.org -}+{-# LANGUAGE DeriveDataTypeable #-} module Database.HDBC.ColTypes (SqlColDesc(..), SqlTypeId(..),@@ -42,13 +43,7 @@ ,colDecDigits :: Maybe Int -- ^ Digits to the right of the period ,colNullable :: Maybe Bool -- ^ Whether NULL is acceptable }- deriving (Eq, Read, Show)--sqlColDescTc :: TyCon-sqlColDescTc = mkTyCon "Database.HDBC.SqlColDesc"--instance Typeable SqlColDesc where- typeOf _ = mkTyConApp sqlColDescTc []+ deriving (Eq, Read, Show, Typeable) {- | The type identifier for a given column. @@ -88,13 +83,7 @@ | SqlGUIDT -- ^ Global unique identifier | SqlUnknownT String -- ^ A type not represented here; implementation-specific information in the String - deriving (Eq, Show, Read)--sqlTypeIdTc :: TyCon-sqlTypeIdTc = mkTyCon "Database.HDBC.SqlTypeId"--instance Typeable SqlTypeId where- typeOf _ = mkTyConApp sqlTypeIdTc []+ deriving (Eq, Show, Read, Typeable) {- | The different types of intervals in SQL. -} data SqlInterval =@@ -111,10 +100,4 @@ | SqlIntervalHourToMinuteT -- ^ Difference in hours+minutes | SqlIntervalHourToSecondT -- ^ Difference in hours+seconds | SqlIntervalMinuteToSecondT -- ^ Difference in minutes+seconds- deriving (Eq, Show, Read)--sqlIntervalTc :: TyCon-sqlIntervalTc = mkTyCon "Database.HDBC.SqlInterval"--instance Typeable SqlInterval where- typeOf _ = mkTyConApp sqlIntervalTc []+ deriving (Eq, Show, Read, Typeable)
Database/HDBC/SqlValue.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-} module Database.HDBC.SqlValue ( -- * SQL value marshalling@@ -209,10 +211,7 @@ | SqlEpochTime Integer -- ^ DEPRECATED Representation of ClockTime or CalendarTime. Use SqlPOSIXTime instead. | SqlTimeDiff Integer -- ^ DEPRECATED Representation of TimeDiff. Use SqlDiffTime instead. | SqlNull -- ^ NULL in SQL or Nothing in Haskell- deriving (Show)--instance Typeable SqlValue where- typeOf _ = mkTypeName "SqlValue"+ deriving (Show, Typeable) instance Eq SqlValue where SqlString a == SqlString b = a == b@@ -242,6 +241,9 @@ a == b = ((safeFromSql a)::ConvertResult String) == ((safeFromSql b)::ConvertResult String) +deriving instance Typeable ST.ClockTime+deriving instance Typeable ST.TimeDiff+ instance Convertible SqlValue SqlValue where safeConvert = return @@ -594,26 +596,6 @@ safeConvert (SqlEpochTime x) = return . fromIntegral $ x safeConvert (SqlTimeDiff x) = return . fromIntegral $ x safeConvert y@(SqlNull) = quickError y--#ifndef TIME_GT_113-instance Typeable Day where- typeOf _ = mkTypeName "Day"-instance Typeable TimeOfDay where- typeOf _ = mkTypeName "TimeOfDay"-instance Typeable LocalTime where- typeOf _ = mkTypeName "LocalTime"-instance Typeable ZonedTime where- typeOf _ = mkTypeName "ZonedTime"-instance Typeable DiffTime where- typeOf _ = mkTypeName "DiffTime"-instance Typeable TimeZone where- typeOf _ = mkTypeName "TimeZone"-#endif--instance Typeable ST.ClockTime where- typeOf _ = mkTypeName "ClockTime"-instance Typeable ST.TimeDiff where- typeOf _ = mkTypeName "TimeDiff" instance Convertible Day SqlValue where safeConvert = return . SqlLocalDate
Database/HDBC/Statement.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveDataTypeable #-} module Database.HDBC.Statement ( Statement(..),@@ -107,13 +108,8 @@ data SqlError = SqlError {seState :: String, seNativeError :: Int, seErrorMsg :: String}- deriving (Eq, Show, Read)--sqlErrorTc :: TyCon-sqlErrorTc = mkTyCon "Database.HDBC.SqlError"+ deriving (Eq, Show, Read, Typeable) -instance Typeable SqlError where- typeOf _ = mkTyConApp sqlErrorTc [] #if __GLASGOW_HASKELL__ >= 610 --data SqlException
HDBC.cabal view
@@ -1,8 +1,8 @@ Name: HDBC-Version: 2.3.1.2+Version: 2.4.0.0 License: BSD3 Maintainer: Nicolas Wu <nicolas.wu@gmail.com>-Author: John Goerzen+Author: John Goerzen, Nicolas Wu homepage: https://github.com/hdbc/hdbc Copyright: Copyright (c) 2005-2011 John Goerzen license-file: LICENSE@@ -28,20 +28,12 @@ description: Build the executable to run unit tests default: False -flag time_gte_113- description: time > 1.1.3 has defined some more instances so omit them here- library if flag(splitBase)- Build-Depends: base>=3 && <5, old-time, time>=1.1.2.4 && <=1.5, bytestring, containers, old-locale- if flag(time_gte_113)- Build-Depends: time>=1.1.3- CPP-OPTIONS: -DTIME_GT_113- else- Build-Depends: time<1.1.3+ Build-Depends: base>=3 && <5, old-time, time>=1.1.3 && <=1.5, bytestring, containers, old-locale else Build-Depends: base<3- Build-Depends: mtl, convertible >= 1.0.10.0, text, utf8-string+ Build-Depends: mtl, convertible >= 1.1.0.0, text, utf8-string -- Hack for cabal-install weirdness. cabal-install forces base 3, -- though it works fine for Setup.lhs manually. Fix.@@ -56,7 +48,7 @@ Other-Modules: Database.HDBC.Utils Extensions: ExistentialQuantification, CPP, MultiParamTypeClasses, FlexibleContexts, TypeSynonymInstances, TypeOperators, RankNTypes,- FlexibleInstances+ FlexibleInstances, DeriveDataTypeable Executable runtests if flag(buildtests)@@ -64,15 +56,10 @@ Build-Depends: HUnit, QuickCheck (>= 2.0), testpack (>= 2.0) if flag(splitBase)- Build-Depends: base>=3 && <5, old-time, time>=1.1.2.4 && <=1.5, bytestring, containers, old-locale- if flag(time_gte_113)- Build-Depends: time>=1.1.3- CPP-OPTIONS: -DTIME_GT_113- else- Build-Depends: time<1.1.3+ Build-Depends: base>=3 && <5, old-time, time>=1.1.3 && <=1.5, bytestring, containers, old-locale else Build-Depends: base<3- Build-Depends: mtl, convertible >= 1.0.9.1, utf8-string, text+ Build-Depends: mtl, convertible >= 1.1.0.0, utf8-string, text -- Hack for cabal-install weirdness. cabal-install forces base 3, -- though it works fine for Setup.lhs manually. Fix.