packages feed

opaleye 0.10.2.1 → 0.10.2.2

raw patch · 8 files changed

+36/−32 lines, 8 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.10.2.2++* Documentation improvements+ ## 0.10.2.1  * Fixed bug that generated broken queries when using ordered
opaleye.cabal view
@@ -1,6 +1,6 @@ name:            opaleye copyright:       Copyright (c) 2014-2018 Purely Agile Limited; 2019-2024 Tom Ellis-version:         0.10.2.1+version:         0.10.2.2 synopsis:        An SQL-generating DSL targeting PostgreSQL description:     An SQL-generating DSL targeting PostgreSQL.  Allows                  Postgres queries to be written within Haskell in a
src/Opaleye/Field.hs view
@@ -62,7 +62,7 @@               -> (Field a -> Field b)               -- ^               -> FieldNullable a-              -- ^+              -- ^ ͘               -> Field b matchNullable replacement f x = C.unsafeIfThenElse (isNull x) replacement                                                    (f (unsafeCoerceField x))@@ -76,7 +76,7 @@ fromNullable :: Field a              -- ^              -> FieldNullable a-             -- ^+             -- ^ ͘              -> Field a fromNullable = flip matchNullable id 
src/Opaleye/Manipulation.hs view
@@ -180,7 +180,7 @@ -- @uUpdateWith = updateEasy (\\... -> ...)@ updateEasy :: D.Default Updater fieldsR fieldsW            => (fieldsR -> fieldsR)-           -- ^+           -- ^ ͘            -> (fieldsR -> fieldsW) updateEasy u = u' . u   where Updater u' = D.def@@ -206,7 +206,7 @@ -- 'rReturning'. rReturning :: D.Default RS.FromFields fields haskells            => (fieldsR -> fields)-           -- ^+           -- ^ ͘            -> MI.Returning fieldsR [haskells] rReturning = rReturningExplicit D.def @@ -215,14 +215,14 @@ -- flexible. rReturningI :: D.Default (Inferrable RS.FromFields) fields haskells             => (fieldsR -> fields)-            -- ^+            -- ^ ͘             -> MI.Returning fieldsR [haskells] rReturningI = rReturningExplicit (runInferrable D.def)  -- | Return a function of the inserted or updated rows.  Explicit -- version.  You probably just want to use 'rReturning' instead. rReturningExplicit :: RS.FromFields fields haskells-                   -- ^+                   -- ^ ͘                    -> (fieldsR -> fields)                    -- ^                    -> MI.Returning fieldsR [haskells]
src/Opaleye/MaybeFields.hs view
@@ -66,7 +66,7 @@                     => SelectArr a b                     -- ^                     -> SelectArr (MaybeFields a) (MaybeFields b)-                    -- ^+                    -- ^ ͘ traverseMaybeFields = Opaleye.Internal.MaybeFields.traverseMaybeFields  -- The Unpackspecs are currently redundant, but I'm adding them in
src/Opaleye/RunSelect.hs view
@@ -3,8 +3,8 @@  module Opaleye.RunSelect   (-- * Running 'S.Select's-   runSelect,    runSelectI,+   runSelect,    runSelectFold,    -- * Cursor interface    declareCursor,@@ -39,29 +39,19 @@  import qualified Data.Profunctor.Product.Default as D --- | @runSelect@'s use of the @'D.Default' 'FromFields'@+-- | An alternative version of @runSelectI@ that is more general but+-- has worse type inference.  @runSelect@'s use of the @'D.Default'+-- 'FromFields'@ -- typeclass means that the -- compiler will have trouble inferring types.  It is strongly -- recommended that you provide full type signatures when using -- @runSelect@.------ Example type specialization:--- -- @--- runSelect :: 'S.Select' ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlInt4', 'Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlText') -> IO [(Int, String)]--- @------ Assuming the @makeAdaptorAndInstance@ splice has been run for the product type @Foo@:------ @--- runSelect :: 'S.Select' (Foo ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlInt4') ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlText') ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlBool')---           -> IO [Foo Int String Bool]--- @ runSelect :: D.Default FromFields fields haskells           => PGS.Connection           -- ^           -> S.Select fields-          -- ^+          -- ^ ͘           -> IO [haskells] runSelect = RQ.runQuery @@ -70,7 +60,7 @@             => PGS.Connection             -- ^             -> S.Select (rec TF.O)-            -- ^+            -- ^ ͘             -> IO [rec TF.H] runSelectTF = RQ.runQuery @@ -88,7 +78,7 @@   -> b   -- ^   -> (b -> haskells -> IO b)-  -- ^+  -- ^ ͘   -> IO b runSelectFold = RQ.runQueryFold @@ -99,7 +89,7 @@     => PGS.Connection     -- ^     -> S.Select fields-    -- ^+    -- ^ ͘     -> IO (IRQ.Cursor haskells) declareCursor = RQ.declareCursor @@ -118,7 +108,7 @@     -> (a -> haskells -> IO a)     -- ^     -> a-    -- ^+    -- ^ ͘     -> IO (Either a a) foldForward = RQ.foldForward @@ -163,11 +153,21 @@     -> IO (IRQ.Cursor haskells) declareCursorExplicit = RQ.declareCursorExplicit --- | Version of 'runSelect' with better type inference+-- | Example type specialization:+--+-- @+-- runSelectI :: 'S.Select' ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlInt4', 'Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlText') -> IO [(Int, String)]+-- @+--+-- Assuming the @makeAdaptorAndInstance@ splice has been run for the product type @Foo@:+--+-- @+-- runSelectI :: 'S.Select' (Foo ('Opaleye.Field.Field' 'Opaleye.SqlTypes.SqlInt4') ('Opaleye.Field.Field' 'Opaleye.Sql+-- @ runSelectI :: (D.Default (Inferrable FromFields) fields haskells)            => PGS.Connection            -- ^            -> S.Select fields-           -- ^+           -- ^ ͘            -> IO [haskells] runSelectI = RQ.runQueryExplicit (runInferrable D.def)
src/Opaleye/Table.hs view
@@ -101,7 +101,7 @@ -- @ selectTable :: D.Default U.Unpackspec fields fields             => Table a fields-            -- ^+            -- ^ ͘             -> S.Select fields selectTable = selectTableExplicit D.def @@ -126,7 +126,7 @@ selectTableExplicit :: U.Unpackspec tablefields fields                     -- ^                     -> Table a tablefields-                    -- ^+                    -- ^ ͘                     -> S.Select fields selectTableExplicit cm table' = Q.productQueryArr $ do   t0 <- Tag.fresh
src/Opaleye/ToFields.hs view
@@ -48,6 +48,6 @@ -- | Version of 'C.toFields' with better type inference toFieldsI :: (D.Default (Inferrable C.ToFields) haskells fields)           => haskells-          -- ^+          -- ^ ͘           -> fields toFieldsI = toFieldsExplicit (runInferrable D.def)