packages feed

direct-sqlite 2.3.6 → 2.3.7

raw patch · 3 files changed

+17/−5 lines, 3 files

Files

Database/SQLite3/Bindings/Types.hsc view
@@ -124,6 +124,11 @@ instance Show ParamIndex where     show (ParamIndex n) = show n +-- | Limit min/max bounds to fit into SQLite's native parameter ranges.+instance Bounded ParamIndex where+    minBound = ParamIndex (fromIntegral (minBound :: CInt))+    maxBound = ParamIndex (fromIntegral (maxBound :: CInt))+ -- | Index of a column in a result set.  Column indices start from 0. newtype ColumnIndex = ColumnIndex Int     deriving (Eq, Ord, Enum, Num, Real, Integral)@@ -131,6 +136,11 @@ -- | This just shows the underlying integer, without the data constructor. instance Show ColumnIndex where     show (ColumnIndex n) = show n++-- | Limit min/max bounds to fit into SQLite's native parameter ranges.+instance Bounded ColumnIndex where+    minBound = ColumnIndex (fromIntegral (minBound :: CInt))+    maxBound = ColumnIndex (fromIntegral (maxBound :: CInt))  -- | Number of columns in a result set. type ColumnCount = ColumnIndex
direct-sqlite.cabal view
@@ -1,5 +1,5 @@ name: direct-sqlite-version: 2.3.6+version: 2.3.7 build-type: Simple license: BSD3 license-file: LICENSE@@ -20,6 +20,8 @@   supports strings encoded as UTF8, and BLOBs represented as ByteStrings.   .   Release history:+  .+  [Version 2.3.7] Fix a test failure related to 64-bit math on column indices.   .   [Version 2.3.6] Re-apply the stat64 hack after upgrade to the bundled   SQLite3.  Oops!
test/Main.hs view
@@ -407,8 +407,8 @@               Just "y"  <- columnName stmt 2               Just "ü"  <- columnName stmt 3               Nothing   <- columnName stmt 4-              Nothing   <- columnName stmt (ColumnIndex minBound)-              Nothing   <- columnName stmt (ColumnIndex maxBound)+              Nothing   <- columnName stmt minBound+              Nothing   <- columnName stmt maxBound               return ()       checkNames       Row <- step stmt@@ -427,8 +427,8 @@       Just "123"  <- columnName stmt 2       Just "über" <- columnName stmt 3       Nothing     <- columnName stmt 4-      Nothing     <- columnName stmt (ColumnIndex minBound)-      Nothing     <- columnName stmt (ColumnIndex maxBound)+      Nothing     <- columnName stmt minBound+      Nothing     <- columnName stmt maxBound       return ()  -- Testing for specific error codes: