packages feed

redis-schema 0.2.0 → 0.2.1

raw patch · 3 files changed

+10/−10 lines, 3 filesdep ~hedisPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: hedis

API changes (from Hackage documentation)

- Database.Redis.Schema: instance (Database.Redis.Types.RedisResult a, Database.Redis.Types.RedisResult b, Database.Redis.Types.RedisResult c) => Database.Redis.Types.RedisResult (a, b, c)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@-# v0.2+# CHANGELOG +## v0.2.1++- Bump hedis lower bound to 0.16.3 and remove orphan instance in favour of upstream one (see [#13](https://github.com/chordify/redis-schema/pull/13)).++## v0.2+ - Support GHC 9.8-9.12. Bump `hedis` to 0.16 (see [#11](https://github.com/chordify/redis-schema/pull/11)). - Throw errors on silent discarding of errors from ByteString decoding (see [#10](https://github.com/chordify/redis-schema/pull/10)). @@ -15,6 +21,6 @@   - or `(v :| [])`    - or `NE.singleton v` (`import qualified Data.List.NonEmpty as NE`). -# v0.1+## v0.1  First public version of `redis-schema`.
redis-schema.cabal view
@@ -7,7 +7,7 @@ -- hash: 1876630159ac153904237e5ab7ec2b440a07213ac8ca4b6420a02fff46e1524d  name:           redis-schema-version:        0.2.0+version:        0.2.1 synopsis:       Typed, schema-based, composable Redis library description:    Typed, schema-based, composable Redis library category:       Database@@ -45,7 +45,7 @@     , bytestring     , containers     , exceptions-    , hedis >=0.16.1 && <0.17+    , hedis >=0.16.3 && <0.17     , monadIO     , mtl     , numeric-limits
src/Database/Redis/Schema.hs view
@@ -23,7 +23,6 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- for (RefInstance ref) in constraints in instance head-{-# OPTIONS_GHC -fno-warn-orphans #-} -- for Hedis.RedisResult (a,b,c)  -- | The schema-based Redis module. --   This module is intended to be imported qualified.@@ -1073,11 +1072,6 @@ --   Available since Redis 5.0.0 bzpopmin :: Hedis.RedisCtx m f => ByteString -> Integer -> m (f (Maybe (ByteString, ByteString, Double))) bzpopmin k timeout = Hedis.sendRequest ["BZPOPMIN", k, toBS timeout]---- Orphan instance, Hedis only implements this for 2-tuples, but BZPOPMIN gets 3 results-instance (Hedis.RedisResult a, Hedis.RedisResult b, Hedis.RedisResult c) => Hedis.RedisResult (a,b,c) where-  decode (Hedis.MultiBulk (Just [x,y,z])) = (,,) <$> Hedis.decode x <*> Hedis.decode y <*> Hedis.decode z-  decode r                                = Left r  -- | Get elements from a sorted set, between the given min and max values, and with the given offset and limit. zRangeByScoreLimit :: forall ref a. (Ref ref, ValueType ref ~ [(Priority, a)], Serializable a)