hasql-postgres 0.3.0 → 0.3.1
raw patch · 2 files changed
+2/−77 lines, 2 filesdep ~hasql-backenddep ~list-tdep ~mtl-preludePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hasql-backend, list-t, mtl-prelude
API changes (from Hackage documentation)
Files
- hasql-postgres.cabal +2/−41
- profiling/Main.hs +0/−36
hasql-postgres.cabal view
@@ -1,7 +1,7 @@ name: hasql-postgres version:- 0.3.0+ 0.3.1 synopsis: A "PostgreSQL" backend for the "hasql" library description:@@ -223,46 +223,7 @@ monad-control == 0.3.*, deepseq == 1.3.*, list-t == 0.2.*,- mtl-prelude == 2.0.*,- base-prelude >= 0.1.3 && < 0.2,- base >= 4.5 && < 4.8---benchmark profiling- type: - exitcode-stdio-1.0- hs-source-dirs:- profiling- main-is:- Main.hs- ghc-options:- -O2- -threaded- "-with-rtsopts=-N"- -funbox-strict-fields- -fprof-auto- "-with-rtsopts=-N -p -s -h -i0.1"- default-extensions:- Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFunctor, DeriveGeneric, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, ImpredicativeTypes, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples- default-language:- Haskell2010- build-depends:- postgresql-simple == 0.4.*,- hasql-postgres,- hasql-backend,- hasql >= 0.1.4 && < 0.2,- -- random:- QuickCheck == 2.7.*,- quickcheck-instances == 0.3.*,- -- data:- vector == 0.10.*,- time >= 1.4 && < 1.6,- text >= 1 && < 1.3,- scientific == 0.3.*,- -- general:- list-t == 0.2.*,- mtl-prelude == 2.0.*,+ mtl-prelude < 3, base-prelude >= 0.1.3 && < 0.2, base >= 4.5 && < 4.8-
− profiling/Main.hs
@@ -1,36 +0,0 @@-import BasePrelude-import MTLPrelude-import Data.Text (Text)-import Data.Vector (Vector)-import Data.Time-import qualified Hasql as H-import qualified Hasql.Postgres as H-import qualified ListT-import qualified Test.QuickCheck.Gen as Q-import qualified Test.QuickCheck.Arbitrary as Q-import qualified Test.QuickCheck.Instances---main = do- rows :: [(Text, Day)] <- - liftIO $ replicateM 100 $ - (,) <$> Q.generate Q.arbitrary <*> Q.generate Q.arbitrary- H.session (H.Postgres host port user password db) (fromJust $ H.sessionSettings 1 30) $ do- H.tx Nothing $ do- H.unit [H.q|DROP TABLE IF EXISTS a|]- H.unit [H.q|CREATE TABLE a (id SERIAL NOT NULL, - name VARCHAR NOT NULL, - birthday DATE, - PRIMARY KEY (id))|]- forM_ rows $ \(name, birthday) -> do- H.unit $ [H.q|INSERT INTO a (name, birthday) VALUES (?, ?)|] name birthday- replicateM_ 2000 $ do- H.tx Nothing $ do- H.list $ [H.q|SELECT * FROM a|] :: H.Tx H.Postgres s [(Int, Text, Day)]---host = "localhost"-port = 5432-user = "postgres"-password = ""-db = "postgres"