packages feed

persistent-postgresql 0.7.0 → 0.8.0

raw patch · 2 files changed

+12/−14 lines, 2 filesdep ~conduitdep ~persistent

Dependency ranges changed: conduit, persistent

Files

Database/Persist/Postgresql.hs view
@@ -186,8 +186,8 @@     pullS (ret, rowRef, rowCount, getters) = do         row <- atomicModifyIORef rowRef (\r -> (r+1, r))         if row == rowCount-           then return C.Closed-           else fmap C.Open $ forM (zip getters [0..]) $ \(getter, col) -> do+           then return C.IOClosed+           else fmap C.IOOpen $ forM (zip getters [0..]) $ \(getter, col) -> do                                 mbs <- LibPQ.getvalue' ret row col                                 case mbs of                                   Nothing -> return PersistNull@@ -208,10 +208,8 @@     render (P (PersistTimeOfDay t))   = PG.render t     render (P (PersistUTCTime t))     = PG.render t     render (P PersistNull)            = PG.render PG.Null-    render (P (PersistList _))        =-        error "Refusing to serialize a PersistList to a PostgreSQL value"-    render (P (PersistMap _))         =-        error "Refusing to serialize a PersistMap to a PostgreSQL value"+    render (P (PersistList l))        = PG.render $ listToJSON l+    render (P (PersistMap m))         = PG.render $ mapToJSON m     render (P (PersistObjectId _))    =         error "Refusing to serialize a PersistObjectId to a PostgreSQL value" @@ -373,7 +371,7 @@                 Right t -> do                     let cname = DBName x                     ref <- getRef cname-                    return $ Right $ Column cname (y == "YES") t d'' ref+                    return $ Right $ Column cname (y == "YES") t d'' Nothing ref   where     getRef cname = do         let sql = pack $ concat@@ -410,10 +408,10 @@     return $ Left $ pack $ "Invalid result from information_schema: " ++ show x  findAlters :: Column -> [Column] -> ([AlterColumn'], [Column])-findAlters col@(Column name isNull type_ def ref) cols =+findAlters col@(Column name isNull type_ def _maxLen ref) cols =     case filter (\c -> cName c == name) cols of         [] -> ([(name, Add col)], cols)-        Column _ isNull' type_' def' ref':_ ->+        Column _ isNull' type_' def' _maxLen' ref':_ ->             let refDrop Nothing = []                 refDrop (Just (_, cname)) = [(name, DropReference cname)]                 refAdd Nothing = []@@ -441,7 +439,7 @@                  filter (\c -> cName c /= name) cols)  showColumn :: Column -> String-showColumn (Column n nu t def ref) = concat+showColumn (Column n nu t def _maxLen ref) = concat     [ T.unpack $ escape n     , " "     , showSqlType t
persistent-postgresql.cabal view
@@ -1,8 +1,8 @@ name:            persistent-postgresql-version:         0.7.0+version:         0.8.0 license:         BSD3 license-file:    LICENSE-author:          Michael Snoyman <michael@snoyman.com>+author:          Felipe Lessa, Michael Snoyman <michael@snoyman.com> maintainer:      Michael Snoyman <michael@snoyman.com> synopsis:        Backend for the persistent library using postgresql. description:     Based on the postgresql-simple package@@ -17,14 +17,14 @@                    , transformers          >= 0.2.1    && < 0.3                    , postgresql-simple     >= 0.0.3    && < 0.1                    , postgresql-libpq      >= 0.6.1    && < 0.7-                   , persistent            >= 0.7      && < 0.8+                   , persistent            >= 0.8      && < 0.9                    , containers            >= 0.2                    , bytestring            >= 0.9      && < 0.10                    , text                  >= 0.7      && < 0.12                    , monad-control         >= 0.2      && < 0.4                    , time                  >= 1.1                    , aeson                 >= 0.5-                   , conduit+                   , conduit               >= 0.2     exposed-modules: Database.Persist.Postgresql     ghc-options:     -Wall