hasql-cursor-query 0.4.4.1 → 0.4.4.2
raw patch · 5 files changed
+46/−47 lines, 5 filesdep −tasty-smallcheckdep ~QuickCheckdep ~hasqldep ~hasql-transactionPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: tasty-smallcheck
Dependency ranges changed: QuickCheck, hasql, hasql-transaction, tasty, tasty-hunit, tasty-quickcheck
API changes (from Hackage documentation)
- Hasql.CursorQuery: data BatchSize :: *
+ Hasql.CursorQuery: data BatchSize
Files
- hasql-cursor-query.cabal +9/−10
- tasty/Main.hs +3/−3
- tasty/Main/CursorQueries.hs +2/−2
- tasty/Main/Queries.hs +0/−32
- tasty/Main/Statements.hs +32/−0
hasql-cursor-query.cabal view
@@ -1,7 +1,7 @@ name: hasql-cursor-query version:- 0.4.4.1+ 0.4.4.2 category: Hasql, Database, PostgreSQL, Streaming synopsis:@@ -55,8 +55,8 @@ Hasql.CursorQuery build-depends: -- database:- hasql >= 0.19 && < 0.20 || >= 1 && < 1.2,- hasql-transaction >= 0.5 && < 0.6,+ hasql >= 1.3 && < 1.4,+ hasql-transaction >= 0.7 && < 0.8, hasql-cursor-transaction >= 0.6 && < 0.7, -- data: bytestring >= 0.10 && < 0.11,@@ -78,7 +78,7 @@ Main.hs other-modules: Main.CursorQueries- Main.Queries+ Main.Statements Main.IO default-extensions: Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples@@ -89,12 +89,11 @@ hasql, hasql-cursor-query, -- testing:- tasty == 0.11.*,- tasty-quickcheck == 0.8.*,- tasty-smallcheck == 0.8.*,- tasty-hunit == 0.9.*,- quickcheck-instances >= 0.3.11 && < 0.4,- QuickCheck >= 2.8.1 && < 2.9,+ tasty >=1.0.1 && <1.2,+ tasty-quickcheck >=0.10 && <0.11,+ tasty-hunit >=0.10 && <0.11,+ quickcheck-instances >=0.3.11 && <0.4,+ QuickCheck >=2.8.1 && <3, -- foldl >= 1.2 && < 2, rebase < 2
tasty/Main.hs view
@@ -7,7 +7,7 @@ import qualified Hasql.Session as A import qualified Hasql.CursorQuery.Sessions as C import qualified Main.CursorQueries as D-import qualified Main.Queries as E+import qualified Main.Statements as E import qualified Main.IO as F @@ -19,11 +19,11 @@ [ testCase "Amount" $ do- (count1, count2) <- F.session ((,) <$> A.query () E.countPGType <*> C.cursorQuery () D.countPGType)+ (count1, count2) <- F.session ((,) <$> A.statement () E.countPGType <*> C.cursorQuery () D.countPGType) assertEqual (show (count1, count2)) count1 count2 , testCase "Equality" $ do- (result1, result2) <- F.session ((,) <$> A.query () E.slectOIDAndTypeName <*> C.cursorQuery () D.slectOIDAndTypeName)+ (result1, result2) <- F.session ((,) <$> A.statement () E.slectOIDAndTypeName <*> C.cursorQuery () D.slectOIDAndTypeName) assertEqual (show (result1, result2)) result1 result2 ]
tasty/Main/CursorQueries.hs view
@@ -19,7 +19,7 @@ reducingDecoder rowDecoder fold where rowDecoder =- (,) <$> B.value B.int8 <*> B.value B.text+ (,) <$> B.column B.int8 <*> B.column B.text fold = C.length @@ -35,7 +35,7 @@ reducingDecoder rowDecoder fold where rowDecoder =- (,) <$> B.value B.int8 <*> B.value B.text+ (,) <$> B.column B.int8 <*> B.column B.text fold = C.list
− tasty/Main/Queries.hs
@@ -1,32 +0,0 @@-module Main.Queries where--import Rebase.Prelude-import Hasql.Query-import qualified Hasql.Encoders as A-import qualified Hasql.Decoders as B---countPGType :: Query () Int-countPGType =- statement sql encoder decoder True- where- sql =- "select count(*) from pg_type"- encoder =- A.unit- decoder =- B.singleRow (B.value (fmap fromIntegral B.int8))- -slectOIDAndTypeName :: Query () [(Int64, Text)]-slectOIDAndTypeName =- statement sql encoder decoder True- where- sql =- "select oid, typname from pg_type"- encoder =- A.unit- decoder =- B.rowsList rowDecoder- where- rowDecoder =- (,) <$> B.value B.int8 <*> B.value B.text
+ tasty/Main/Statements.hs view
@@ -0,0 +1,32 @@+module Main.Statements where++import Rebase.Prelude+import Hasql.Statement+import qualified Hasql.Encoders as A+import qualified Hasql.Decoders as B+++countPGType :: Statement () Int+countPGType =+ Statement sql encoder decoder True+ where+ sql =+ "select count(*) from pg_type"+ encoder =+ A.unit+ decoder =+ B.singleRow (B.column (fmap fromIntegral B.int8))+ +slectOIDAndTypeName :: Statement () [(Int64, Text)]+slectOIDAndTypeName =+ Statement sql encoder decoder True+ where+ sql =+ "select oid, typname from pg_type"+ encoder =+ A.unit+ decoder =+ B.rowList rowDecoder+ where+ rowDecoder =+ (,) <$> B.column B.int8 <*> B.column B.text