hasql 0.19.3.3 → 0.19.4
raw patch · 3 files changed
+16/−2 lines, 3 filesdep ~postgresql-binary
Dependency ranges changed: postgresql-binary
Files
- hasql.cabal +2/−2
- library/Hasql/Decoders.hs +9/−0
- library/Hasql/Decoders/Value.hs +5/−0
hasql.cabal view
@@ -1,7 +1,7 @@ name: hasql version:- 0.19.3.3+ 0.19.4 category: Hasql, Database, PostgreSQL synopsis:@@ -74,7 +74,7 @@ -- parsing: attoparsec >= 0.10 && < 0.14, -- database:- postgresql-binary >= 0.7.3 && < 0.8,+ postgresql-binary >= 0.7.4 && < 0.8, postgresql-libpq == 0.9.*, -- data: dlist >= 0.7 && < 0.8,
library/Hasql/Decoders.hs view
@@ -42,6 +42,7 @@ composite, hstore, enum,+ custom, -- * Array Array, arrayDimension,@@ -418,6 +419,14 @@ json :: Value Aeson.Value json = Value (Value.decoder (const Decoder.json))++-- |+-- Lifts a custom value decoder function to a 'Value' decoder.+-- +{-# INLINABLE custom #-}+custom :: (Bool -> ByteString -> Either Text a) -> Value a+custom fn =+ Value (Value.decoderFn fn) -- ** Composite value decoders
library/Hasql/Decoders/Value.hs view
@@ -21,3 +21,8 @@ {-# SCC "decoder" #-} Value . ReaderT +{-# INLINE decoderFn #-}+decoderFn :: (Bool -> ByteString -> Either Text a) -> Value a+decoderFn fn =+ Value $ ReaderT $ \integerDatetimes -> Decoder.fn $ fn integerDatetimes+