packages feed

hasql-interpolate 1.0.0.0 → 1.0.1.0

raw patch · 3 files changed

+20/−5 lines, 3 filesdep ~basedep ~bytestringdep ~containers

Dependency ranges changed: base, bytestring, containers, hasql, megaparsec, template-haskell

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## [1.0.1.0] - July 16, 2024++* Add `DecodeValue` instance for `ByteString` and `LazyByteString`+ ## [1.0.0.0] - July 10, 2024  * Add IP address type encoders and decoders
hasql-interpolate.cabal view
@@ -1,8 +1,8 @@ cabal-version:      2.4 name:               hasql-interpolate-version:            1.0.0.0+version:            1.0.1.0 -author: Travis Staton <hello@travisstaton.com>+author: Travis Staton, Mitchell Dalvi Rosen category: Hasql, Database, PostgreSQL copyright: Copyright (C) 2021-2024 Travis Staton, Mitchell Dalvi Rosen extra-source-files: CHANGELOG.md@@ -38,7 +38,7 @@     build-depends:    aeson ^>= 1.5 || ^>= 2.0 || ^>= 2.1 || ^>= 2.2,                       array ^>= 0.5,                       base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17 || ^>= 4.18 || ^>= 4.19 || ^>= 4.20,-                      bytestring ^>= 0.10 || ^>= 0.11 || ^>= 0.12,+                      bytestring ^>= 0.11.2.0 || ^>= 0.12,                       containers ^>= 0.5 || ^>= 0.6 || ^>= 0.7,                       haskell-src-meta ^>= 0.8,                       hasql ^>= 1.8,
lib/Hasql/Interpolate/Internal/Decoder.hs view
@@ -20,8 +20,11 @@   ) where +import Data.ByteString (ByteString)+import Data.ByteString.Lazy (LazyByteString)+import qualified Data.ByteString.Lazy as LazyByteString import Data.IP (IPRange)-import Data.Int+import Data.Int (Int16, Int32, Int64) import Data.Scientific (Scientific) import Data.Text (Text) import Data.Time (Day, DiffTime, LocalTime, UTCTime)@@ -29,7 +32,7 @@ import Data.Vector (Vector) import GHC.Generics import Hasql.Decoders-import Hasql.Interpolate.Internal.Decoder.TH+import Hasql.Interpolate.Internal.Decoder.TH (genDecodeRowInstance)  -- | This type class determines which decoder we will apply to a query -- field by the type of the result.@@ -168,6 +171,14 @@ -- | Parse a postgres @inet@ using 'inet' instance DecodeValue IPRange where   decodeValue = inet++-- | Parse a postgres @bytea@ using 'bytea'+instance DecodeValue ByteString where+  decodeValue = bytea++-- | Parse a postgres @bytea@ using 'bytea'+instance DecodeValue LazyByteString where+  decodeValue = LazyByteString.fromStrict <$> bytea  -- | Overlappable instance for parsing non-nullable values instance {-# OVERLAPPABLE #-} (DecodeValue a) => DecodeField a where