postgresql-binary 0.14.0.1 → 0.14.1
raw patch · 6 files changed
+95/−62 lines, 6 filesdep ~postgresql-libpq
Dependency ranges changed: postgresql-libpq
Files
- library/PostgreSQL/Binary/Decoding.hs +6/−0
- library/PostgreSQL/Binary/Encoding.hs +6/−0
- library/PostgreSQL/Binary/Encoding/Builders.hs +5/−0
- postgresql-binary.cabal +72/−62
- tasty/Main.hs +2/−0
- tasty/Main/Gens.hs +4/−0
library/PostgreSQL/Binary/Decoding.hs view
@@ -21,6 +21,7 @@ numeric, uuid, inet,+ macaddr, json_ast, json_bytes, jsonb_ast,@@ -181,6 +182,11 @@ ip <- ip6 return . IP.IPv6Range $ IP.makeAddrRange ip netmask | otherwise -> BinaryParser.failure ("Unknown address family: " <> fromString (show af))++{-# INLINEABLE macaddr #-}+macaddr :: Value (Word8, Word8, Word8, Word8, Word8, Word8)+macaddr =+ (,,,,,) <$> byte <*> byte <*> byte <*> byte <*> byte <*> byte {-# INLINEABLE json_ast #-} json_ast :: Value Aeson.Value
library/PostgreSQL/Binary/Encoding.hs view
@@ -24,6 +24,7 @@ numeric, uuid, inet,+ macaddr, char_utf8, text_strict, text_lazy,@@ -204,6 +205,11 @@ inet :: G.IPRange -> Encoding inet = B.inet++{-# INLINE macaddr #-}+macaddr :: (Word8, Word8, Word8, Word8, Word8, Word8) -> Encoding+macaddr =+ B.macaddr {-# INLINE char_utf8 #-} char_utf8 :: Char -> Encoding
library/PostgreSQL/Binary/Encoding/Builders.hs view
@@ -217,6 +217,11 @@ ip6Size = word8 16 +{-# INLINEABLE macaddr #-}+macaddr :: (Word8, Word8, Word8, Word8, Word8, Word8) -> Builder+macaddr (a, b, c, d, e, f) =+ word8 a <> word8 b <> word8 c <> word8 d <> word8 e <> word8 f+ -- * Text -- |
postgresql-binary.cabal view
@@ -1,7 +1,7 @@-cabal-version: 3.0-name: postgresql-binary-version: 0.14.0.1-synopsis: Encoders and decoders for the PostgreSQL's binary format+cabal-version: 3.0+name: postgresql-binary+version: 0.14.1+synopsis: Encoders and decoders for the PostgreSQL's binary format description: An API for dealing with PostgreSQL's binary data format. .@@ -9,29 +9,27 @@ E.g., <http://hackage.haskell.org/package/hasql hasql> is based on this library. .- It supports all Postgres versions starting from 8.3 + It supports all Postgres versions starting from 8.3 and is tested against 8.3, 9.3 and 9.5 with the @integer_datetimes@ setting off and on. -category: PostgreSQL, Database, Codecs, Parsing-homepage: https://github.com/nikita-volkov/postgresql-binary -bug-reports: https://github.com/nikita-volkov/postgresql-binary/issues -author: Nikita Volkov <nikita.y.volkov@mail.ru>-maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>-copyright: (c) 2014, Nikita Volkov-license: MIT-license-file: LICENSE+category: PostgreSQL, Database, Codecs, Parsing+homepage: https://github.com/nikita-volkov/postgresql-binary+bug-reports: https://github.com/nikita-volkov/postgresql-binary/issues+author: Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>+copyright: (c) 2014, Nikita Volkov+license: MIT+license-file: LICENSE extra-source-files: CHANGELOG.md source-repository head- type: git+ type: git location: https://github.com/nikita-volkov/postgresql-binary common base- default-language: Haskell2010+ default-language: Haskell2010 default-extensions:- NoImplicitPrelude- NoMonomorphismRestriction Arrows BangPatterns ConstraintKinds@@ -51,6 +49,8 @@ MagicHash MultiParamTypeClasses MultiWayIf+ NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings ParallelListComp PatternGuards@@ -66,9 +66,9 @@ UnboxedTuples library- import: base- hs-source-dirs: library- ghc-options: -funbox-strict-fields+ import: base+ hs-source-dirs: library+ ghc-options: -funbox-strict-fields exposed-modules: PostgreSQL.Binary.Decoding PostgreSQL.Binary.Encoding@@ -84,68 +84,78 @@ PostgreSQL.Binary.Time build-depends:- , aeson >=2 && <3- , base >=4.12 && <5- , binary-parser >=0.5.7 && <0.6- , bytestring >=0.10.4 && <0.13- , bytestring-strict-builder >=0.4.5.4 && <0.5- , containers >=0.5 && <0.8- , iproute >=1.7 && <2- , scientific >=0.3 && <0.4- , text >=1.2 && <3- , time >=1.9 && <2- , transformers >=0.3 && <0.7- , unordered-containers >=0.2 && <0.3- , uuid >=1.3 && <1.4- , vector >=0.12 && <0.14+ aeson >=2 && <3,+ base >=4.12 && <5,+ binary-parser >=0.5.7 && <0.6,+ bytestring >=0.10.4 && <0.13,+ bytestring-strict-builder >=0.4.5.4 && <0.5,+ containers >=0.5 && <0.8,+ iproute >=1.7 && <2,+ scientific >=0.3 && <0.4,+ text >=1.2 && <3,+ time >=1.9 && <2,+ transformers >=0.3 && <0.7,+ unordered-containers >=0.2 && <0.3,+ uuid >=1.3 && <1.4,+ vector >=0.12 && <0.14, -- This test-suite must be executed in a single-thread. test-suite tasty- import: base- type: exitcode-stdio-1.0+ import: base+ type: exitcode-stdio-1.0 hs-source-dirs: tasty- main-is: Main.hs+ main-is: Main.hs other-modules: Main.Apx Main.Composite Main.DB Main.Gens Main.IO+ Main.PTI Main.Prelude Main.Properties- Main.PTI Main.TextEncoder build-depends:- , aeson >=2 && <3- , iproute >=1.4 && <2- , postgresql-binary- , postgresql-libpq >=0.9 && <0.11- , QuickCheck >=2.10 && <3- , quickcheck-instances >=0.3.22 && <0.4- , rerebase >=1.20.1.1 && <2- , tasty >=1.4 && <2- , tasty-hunit >=0.10 && <0.11- , tasty-quickcheck >=0.10 && <0.12+ QuickCheck >=2.10 && <3,+ aeson >=2 && <3,+ iproute >=1.4 && <2,+ postgresql-binary,+ postgresql-libpq >=0.9 && <0.12,+ quickcheck-instances >=0.3.22 && <0.4,+ rerebase >=1.20.1.1 && <2,+ tasty >=1.4 && <2,+ tasty-hunit >=0.10 && <0.11,+ tasty-quickcheck >=0.10 && <0.12, benchmark encoding- import: base- type: exitcode-stdio-1.0+ import: base+ type: exitcode-stdio-1.0 hs-source-dirs: encoding- main-is: Main.hs- ghc-options: -O2 -threaded -with-rtsopts=-N -funbox-strict-fields+ main-is: Main.hs+ ghc-options:+ -O2+ -threaded+ -with-rtsopts=-N+ -funbox-strict-fields+ build-depends:- , criterion >=1.5.9 && <2- , postgresql-binary- , rerebase >=1.20.1.1 && <2+ criterion >=1.5.9 && <2,+ postgresql-binary,+ rerebase >=1.20.1.1 && <2, benchmark decoding- import: base- type: exitcode-stdio-1.0+ import: base+ type: exitcode-stdio-1.0 hs-source-dirs: decoding- main-is: Main.hs- ghc-options: -O2 -threaded -with-rtsopts=-N -funbox-strict-fields+ main-is: Main.hs+ ghc-options:+ -O2+ -threaded+ -with-rtsopts=-N+ -funbox-strict-fields+ build-depends:- , criterion >=1.5.9 && <2- , postgresql-binary- , rerebase >=1.20.1.1 && <2+ criterion >=1.5.9 && <2,+ postgresql-binary,+ rerebase >=1.20.1.1 && <2,
tasty/Main.hs view
@@ -138,6 +138,8 @@ primitiveRoundtrip "inet" Gens.inet PTI.inet A.inet B.inet, select "SELECT '127.0.0.1' :: inet" (const B.inet) (read "127.0.0.1"), select "SELECT '::1' :: inet" (const B.inet) (read "::1"),+ primitiveRoundtrip "macaddr" Gens.macaddr PTI.macaddr A.macaddr B.macaddr,+ select "SELECT '11:22:33:44:55:66' :: macaddr" (const B.macaddr) (0x11, 0x22, 0x33, 0x44, 0x55, 0x66), primitiveRoundtrip "int2_int16" Gens.auto PTI.int2 A.int2_int16 B.int, primitiveRoundtrip "int2_word16" Gens.auto PTI.int2 A.int2_word16 B.int, primitiveRoundtrip "int4_int32" Gens.auto PTI.int4 A.int4_int32 B.int,
tasty/Main/Gens.hs view
@@ -145,6 +145,10 @@ ) else IP.IPv4Range <$> (IP.makeAddrRange <$> (IP.toIPv4w <$> arbitrary) <*> choose (0, 32)) +macaddr :: Gen (Word8, Word8, Word8, Word8, Word8, Word8)+macaddr =+ (,,,,,) <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary+ array3 :: Gen a -> Gen [[[a]]] array3 gen = do