packages feed

persistent-qq 2.9.2 → 2.9.2.1

raw patch · 3 files changed

+12/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for persistent-qq +## 2.9.2.1++* Support `persistent-2.11` in the test suite [#1170](https://github.com/yesodweb/persistent/pull/1170)+ ## 2.9.2  * Add interpolation support for multirow VALUES syntax (`*{rows}`) [#1111](https://github.com/yesodweb/persistent/pull/1111)
persistent-qq.cabal view
@@ -1,13 +1,6 @@ cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.31.1.------ see: https://github.com/sol/hpack------ hash: bef2b585278826bc60fe813d4918833dc06cec43f2a8e4567190448ccfdee163- name:           persistent-qq-version:        2.9.2+version:        2.9.2.1 synopsis:       Provides a quasi-quoter for raw SQL for persistent description:    Please see README and API docs at <http://www.stackage.org/package/persistent>. category:       Database, Yesod
test/PersistentTestModels.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -15,6 +16,7 @@ import Control.Monad.Reader import Data.Aeson import Data.Text (Text)+import Data.Proxy  import Database.Persist.Sql import Database.Persist.TH@@ -140,9 +142,11 @@     keyFromValues = fmap RFOKey . fromPersistValue . head     keyToValues   = (:[]) . toPersistValue . unRFOKey -    entityDef = revFields . entityDef . liftM unRFO-        where-          revFields ed = ed { entityFields = reverse (entityFields ed) }+    entityDef = revFields . entityDef . unRfoProxy+      where+        revFields ed = ed { entityFields = reverse (entityFields ed) }+        unRfoProxy :: proxy (ReverseFieldOrder a) -> Proxy a+        unRfoProxy _ = Proxy      toPersistFields = reverse . toPersistFields . unRFO     newtype EntityField (ReverseFieldOrder a) b = EFRFO {unEFRFO :: EntityField a b}