packages feed

HDBC-postgresql 2.5.0.0 → 2.5.0.1

raw patch · 3 files changed

+23/−6 lines, 3 filesdep −testpackdep ~timePVP ok

version bump matches the API change (PVP)

Dependencies removed: testpack

Dependency ranges changed: time

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +## 2.5.0.1++* Bump time upper bound to 1.14, add round-trip test for 0-padded date.+ ## 2.5.0.0  * Add explicit call to `finalizeForeignPtr` on connection disconnects. Ensures disconnects happen at the moment close is call, as opposed to when the GC frees the ForeignPtr.
HDBC-postgresql.cabal view
@@ -1,5 +1,5 @@ Name: HDBC-postgresql-Version: 2.5.0.0+Version: 2.5.0.1 License: BSD3 Maintainer: Nicolas Wu <nicolas.wu@gmail.com> Author: John Goerzen@@ -21,7 +21,7 @@ Cabal-Version: >=1.10  custom-setup-  setup-depends: Cabal >= 1.8 && < 3.3, base < 5+  setup-depends: Cabal >= 1.8, base < 5  Flag splitBase   description: Choose the new smaller, split-up package.@@ -45,7 +45,7 @@   Build-Depends: base >= 3 && < 5, mtl, HDBC>=2.2.0, parsec, utf8-string,                  bytestring, old-time, convertible   if flag(minTime15)-    Build-Depends: time >= 1.5 && < 1.10+    Build-Depends: time >= 1.5 && < 1.14     CPP-Options: -DMIN_TIME_15   else     Build-Depends: time < 1.5, old-locale@@ -59,11 +59,11 @@ Executable runtests    if flag(buildtests)       Buildable: True-      Build-Depends: HUnit, QuickCheck, testpack, containers,+      Build-Depends: HUnit, QuickCheck, containers,                      convertible, parsec, utf8-string,                      bytestring, old-time, base >= 4.6 && < 5.0, HDBC>=2.2.6       if flag(minTime15)-        Build-Depends: time >= 1.5 && < 1.9+        Build-Depends: time >= 1.5 && < 1.14         CPP-Options: -DMIN_TIME_15       else         Build-Depends: time < 1.5, old-locale
testsrc/TestSbasics.hs view
@@ -1,6 +1,8 @@ module TestSbasics(tests) where import Test.HUnit+import Data.Convertible (convert) import Data.List+import Data.Time (UTCTime(UTCTime), fromGregorian) import Database.HDBC import TestUtils import System.IO@@ -153,6 +155,16 @@                                )     where rows = map (\x -> [Just . show $ x]) [1..9]        +testFirstCentury = dbTestCase $ \dbh ->+  do -- we use UTC to avoid Local Mean Time which the 'time' library can't handle+     runRaw dbh "SET TIMEZONE TO 'UTC';"+     select <- prepare dbh "SELECT ? :: timestamptz;"+     let time = UTCTime (fromGregorian 99 12 25) 0+     execute select [toSql (convert time :: SqlValue)]+     result <- fetchAllRows select+     assertEqual "first century year can roundtrip"+                 time (fromSql $ head $ head result)+ tests = TestList         [          TestLabel "openClosedb" openClosedb,@@ -167,5 +179,6 @@          TestLabel "sFetchAllRows" testsFetchAllRows,          TestLabel "basicTransactions" basicTransactions,          TestLabel "withTransaction" testWithTransaction,-         TestLabel "dropTable" dropTable+         TestLabel "dropTable" dropTable,+         TestLabel "firstCentury" testFirstCentury          ]