packages feed

hasql 1.9.1.2 → 1.9.2

raw patch · 6 files changed

+32/−4 lines, 6 filesdep ~postgresql-binaryPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: postgresql-binary

API changes (from Hackage documentation)

+ Hasql.Decoders: macaddr :: Value (Word8, Word8, Word8, Word8, Word8, Word8)
+ Hasql.Encoders: macaddr :: Value (Word8, Word8, Word8, Word8, Word8, Word8)

Files

README.md view
@@ -7,7 +7,7 @@  # Status -[![Hackage](https://img.shields.io/hackage/v/hasql.svg)](https://hackage.haskell.org/package/hasql) [![Hackage Deps](https://img.shields.io/hackage-deps/v/hasql.svg)](http://packdeps.haskellers.com/reverse/hasql)+[![Hackage](https://img.shields.io/hackage/v/hasql.svg)](https://hackage.haskell.org/package/hasql)  Hasql is production-ready, actively maintained and the API is pretty stable. It's used by many companies and most notably by the [Postgrest](https://postgrest.org/) project. @@ -78,15 +78,19 @@ import qualified Hasql.Decoders as Decoders import qualified Hasql.Encoders as Encoders import qualified Hasql.Connection as Connection+import qualified Hasql.Connection.Setting as ConnectionSetting+import qualified Hasql.Connection.Setting.Connection as ConnectionSettingConnection  + main :: IO () main = do   Right connection <- Connection.acquire connectionSettings   result <- Session.run (sumAndDivModSession 3 8 3) connection   print result   where-    connectionSettings = Connection.connectionString "localhost" 5432 "postgres" "" "postgres"+    connectionSettings = [ConnectionSetting.connection $ ConnectionSettingConnection.string pstr]+    pstr = "host=localhost dbname=postgres user=postgres port=5432"   -- * Sessions
hasql.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: hasql-version: 1.9.1.2+version: 1.9.2 category: Hasql, Database, PostgreSQL synopsis: Fast PostgreSQL driver with a flexible mapping API description:@@ -150,7 +150,7 @@     hashtables >=1.1 && <2,     iproute >=1.7 && <1.8,     mtl >=2 && <3,-    postgresql-binary >=0.14 && <0.15,+    postgresql-binary >=0.14.1 && <0.15,     postgresql-libpq >=0.10.1 && <0.12,     profunctors >=5.1 && <6,     scientific >=0.3 && <0.4,
library/Hasql/Decoders.hs view
@@ -45,6 +45,7 @@     interval,     uuid,     inet,+    macaddr,     json,     jsonBytes,     jsonb,
library/Hasql/Decoders/All.hs view
@@ -259,6 +259,17 @@ inet = Value (Value.decoder (const A.inet))  -- |+-- Decoder of the @MACADDR@ values.+--+-- Represented as a 6-tuple of Word8 values in big endian order. If+-- you use `ip` library consider using it with `fromOctets`.+--+-- > (\(a,b,c,d,e,f) -> fromOctets a b c d e f) <$> macaddr+{-# INLINEABLE macaddr #-}+macaddr :: Value (Word8, Word8, Word8, Word8, Word8, Word8)+macaddr = Value (Value.decoder (const A.macaddr))++-- | -- Decoder of the @JSON@ values into a JSON AST. {-# INLINEABLE json #-} json :: Value Aeson.Value
library/Hasql/Encoders.hs view
@@ -34,6 +34,7 @@     interval,     uuid,     inet,+    macaddr,     json,     jsonBytes,     jsonLazyBytes,
library/Hasql/Encoders/All.hs view
@@ -213,6 +213,17 @@ inet = Value (Value.unsafePTIWithShow PTI.inet (const A.inet))  -- |+-- Encoder of @MACADDR@ values.+--+-- Represented as a 6-tuple of Word8 values in big endian order. If+-- you use `ip` library consider using it with `toOctets`.+--+-- > toOctets >$< macaddr+{-# INLINEABLE macaddr #-}+macaddr :: Value (Word8, Word8, Word8, Word8, Word8, Word8)+macaddr = Value (Value.unsafePTIWithShow PTI.macaddr (const A.macaddr))++-- | -- Encoder of @JSON@ values from JSON AST. {-# INLINEABLE json #-} json :: Value Aeson.Value