packages feed

persistent-postgresql 2.1 → 2.1.0.1

raw patch · 2 files changed

+15/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Database/Persist/Postgresql.hs view
@@ -339,16 +339,25 @@         k (PGFF.typoid -> i) = PG.oid2int i         listOf f = convertPV (PersistList . map f . PG.fromPGArray) +builtinExtensionGetters :: Map.Map ByteString (Getter PersistValue)+builtinExtensionGetters = Map.fromList+    [ ("geometry",      convertPV (PersistDbSpecific . unUnknown))+    , ("geography",     convertPV (PersistDbSpecific . unUnknown))+    ]++ getGetter :: PG.Connection -> PG.Oid -> IO (Getter PersistValue) getGetter conn oid = case I.lookup (PG.oid2int oid) builtinGetters of     Just getter -> return getter     Nothing -> do         tyinfo <- PG.getTypeInfo conn oid-        error $ "Postgresql.getGetter: type "-             ++ explain tyinfo-             ++ " ("-             ++ show oid-             ++ ") not supported."+        case Map.lookup (PG.typname tyinfo) builtinExtensionGetters of+          Just getter -> return getter+          Nothing -> error $ "Postgresql.getGetter: type "+                          ++ explain tyinfo+                          ++ " ("+                          ++ show oid+                          ++ ") not supported."     where         explain tyinfo = case B8.unpack $ PG.typname tyinfo of                         t@('_':ty) -> t ++ " (array of " ++ ty ++ ")"
persistent-postgresql.cabal view
@@ -1,5 +1,5 @@ name:            persistent-postgresql-version:         2.1+version:         2.1.0.1 license:         MIT license-file:    LICENSE author:          Felipe Lessa, Michael Snoyman <michael@snoyman.com>