Hello community, here is the log from the commit of package ghc-persistent for openSUSE:Factory checked in at 2019-08-13 20:44:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-persistent (Old) and /work/SRC/openSUSE:Factory/.ghc-persistent.new.9556 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-persistent" Tue Aug 13 20:44:47 2019 rev:16 rq:723077 version:2.10.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-persistent/ghc-persistent.changes 2019-04-28 20:13:18.198424076 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-persistent.new.9556/ghc-persistent.changes 2019-08-13 20:44:49.423052789 +0200 @@ -1,0 +2,8 @@ +Fri Aug 9 02:02:30 UTC 2019 - [email protected] + +- Update persistent to version 2.10.1. + ## 2.10.1 + + * Added `constraint=` attribute to allow users to specify foreign reference constraint names. + +------------------------------------------------------------------- Old: ---- persistent-2.10.0.tar.gz New: ---- persistent-2.10.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-persistent.spec ++++++ --- /var/tmp/diff_new_pack.8hI1ok/_old 2019-08-13 20:44:50.843052379 +0200 +++ /var/tmp/diff_new_pack.8hI1ok/_new 2019-08-13 20:44:50.871052371 +0200 @@ -19,7 +19,7 @@ %global pkg_name persistent %bcond_with tests Name: ghc-%{pkg_name} -Version: 2.10.0 +Version: 2.10.1 Release: 0 Summary: Type-safe, multi-backend data serialization License: MIT ++++++ persistent-2.10.0.tar.gz -> persistent-2.10.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/persistent-2.10.0/ChangeLog.md new/persistent-2.10.1/ChangeLog.md --- old/persistent-2.10.0/ChangeLog.md 2019-04-17 21:50:10.000000000 +0200 +++ new/persistent-2.10.1/ChangeLog.md 2019-08-08 19:29:15.000000000 +0200 @@ -1,5 +1,9 @@ # Changelog for persistent +## 2.10.1 + +* Added `constraint=` attribute to allow users to specify foreign reference constraint names. + ## 2.10.0 * Added two type classes `OnlyOneUniqueKey` and `AtLeastOneUniqueKey`. These classes are used as constraints on functions that expect a certain amount of unique keys. They are defined automatically as part of the `persistent-template`'s generation. [#885](https://github.com/yesodweb/persistent/pull/885) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/persistent-2.10.0/Database/Persist/Class/PersistEntity.hs new/persistent-2.10.1/Database/Persist/Class/PersistEntity.hs --- old/persistent-2.10.0/Database/Persist/Class/PersistEntity.hs 2019-04-15 04:27:15.000000000 +0200 +++ new/persistent-2.10.1/Database/Persist/Class/PersistEntity.hs 2019-07-17 15:42:19.000000000 +0200 @@ -134,6 +134,12 @@ -- and the argument for the comparison. -- -- Persistent users use combinators to create these. +-- +-- Note that it's important to be careful about the 'PersistFilter' that +-- you are using, if you use this directly. For example, using the 'In' +-- 'PersistFilter' requires that you have an array- or list-shaped +-- 'EntityField'. It is possible to construct values using this that will +-- create malformed runtime values. data Filter record = forall typ. PersistField typ => Filter { filterField :: EntityField record typ , filterValue :: FilterValue typ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/persistent-2.10.0/Database/Persist/Sql/Internal.hs new/persistent-2.10.1/Database/Persist/Sql/Internal.hs --- old/persistent-2.10.0/Database/Persist/Sql/Internal.hs 2019-04-15 04:27:15.000000000 +0200 +++ new/persistent-2.10.1/Database/Persist/Sql/Internal.hs 2019-08-08 19:29:15.000000000 +0200 @@ -61,9 +61,13 @@ Just (resolveTableName allDefs f, refName tn c) | otherwise = Nothing ref _ _ ("noreference":_) = Nothing - ref c _ (a:_) - | Just x <- T.stripPrefix "reference=" a = - Just (DBName x, refName tn c) + ref c fe (a:as) + | Just x <- T.stripPrefix "reference=" a = do + constraintName <- snd <$> (ref c fe as) + pure (DBName x, constraintName) + | Just x <- T.stripPrefix "constraint=" a = do + tableName <- fst <$> (ref c fe as) + pure (tableName, DBName x) ref c x (_:as) = ref c x as refName :: DBName -> DBName -> DBName diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/persistent-2.10.0/Database/Persist/Sql/Orphan/PersistQuery.hs new/persistent-2.10.1/Database/Persist/Sql/Orphan/PersistQuery.hs --- old/persistent-2.10.0/Database/Persist/Sql/Orphan/PersistQuery.hs 2019-04-16 02:36:52.000000000 +0200 +++ new/persistent-2.10.1/Database/Persist/Sql/Orphan/PersistQuery.hs 2019-07-17 15:42:19.000000000 +0200 @@ -343,8 +343,8 @@ else id) $ connEscapeName conn $ fieldName field qmarks = case value of - FilterValue{} -> "?" - UnsafeValue{} -> "?" + FilterValue{} -> "(?)" + UnsafeValue{} -> "(?)" FilterValues xs -> let parens a = "(" <> a <> ")" commas = T.intercalate "," diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/persistent-2.10.0/persistent.cabal new/persistent-2.10.1/persistent.cabal --- old/persistent-2.10.0/persistent.cabal 2019-04-15 04:27:15.000000000 +0200 +++ new/persistent-2.10.1/persistent.cabal 2019-08-08 19:29:31.000000000 +0200 @@ -1,5 +1,5 @@ name: persistent -version: 2.10.0 +version: 2.10.1 license: MIT license-file: LICENSE author: Michael Snoyman <[email protected]>
