packages feed

hedis 0.13.0 → 0.13.1

raw patch · 5 files changed

+49/−23 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,5 +1,10 @@ # Changelog for Hedis +## 0.13.1++* PR #158. Upgrade to Redis 6.0.9 & Fix auth test+* PR #160. Fix GHC 8.0.1 compat+ ## 0.13.0  * PR #159. Issue #152. Make HSET return integer instead of bool
hedis.cabal view
@@ -1,5 +1,5 @@ name:               hedis-version:            0.13.0+version:            0.13.1 synopsis:     Client library for the Redis datastore: supports full command set,     pipelining.
src/Database/Redis/ManualCommands.hs view
@@ -1,10 +1,13 @@-{-# LANGUAGE OverloadedStrings, RecordWildCards, FlexibleContexts #-}+{-# LANGUAGE CPP, OverloadedStrings, RecordWildCards, FlexibleContexts #-}  module Database.Redis.ManualCommands where  import Prelude hiding (min, max) import Data.ByteString (ByteString, empty, append) import Data.Maybe (maybeToList)+#if __GLASGOW_HASKELL__ < 808+import Data.Semigroup ((<>))+#endif import Database.Redis.Core import Database.Redis.Protocol import Database.Redis.Types@@ -1157,18 +1160,33 @@     } deriving (Show, Eq)  instance RedisResult XInfoStreamResponse where-    decode (MultiBulk (Just [-        Bulk (Just "length"),Integer xinfoStreamLength,-        Bulk (Just "radix-tree-keys"),Integer xinfoStreamRadixTreeKeys,-        Bulk (Just "radix-tree-nodes"),Integer xinfoStreamRadixTreeNodes,-        Bulk (Just "groups"),Integer xinfoStreamNumGroups,-        Bulk (Just "last-generated-id"),Bulk (Just xinfoStreamLastEntryId),-        Bulk (Just "first-entry"), rawFirstEntry ,-        Bulk (Just "last-entry"), rawLastEntry ])) = do-            xinfoStreamFirstEntry <- decode rawFirstEntry-            xinfoStreamLastEntry <- decode rawLastEntry-            return XInfoStreamResponse{..}-    decode a = Left a+    decode = decodeRedis5 <> decodeRedis6+        where+            decodeRedis5 (MultiBulk (Just [+                Bulk (Just "length"),Integer xinfoStreamLength,+                Bulk (Just "radix-tree-keys"),Integer xinfoStreamRadixTreeKeys,+                Bulk (Just "radix-tree-nodes"),Integer xinfoStreamRadixTreeNodes,+                Bulk (Just "groups"),Integer xinfoStreamNumGroups,+                Bulk (Just "last-generated-id"),Bulk (Just xinfoStreamLastEntryId),+                Bulk (Just "first-entry"), rawFirstEntry ,+                Bulk (Just "last-entry"), rawLastEntry ])) = do+                    xinfoStreamFirstEntry <- decode rawFirstEntry+                    xinfoStreamLastEntry <- decode rawLastEntry+                    return XInfoStreamResponse{..}+            decodeRedis5 a = Left a++            decodeRedis6 (MultiBulk (Just [+                Bulk (Just "length"),Integer xinfoStreamLength,+                Bulk (Just "radix-tree-keys"),Integer xinfoStreamRadixTreeKeys,+                Bulk (Just "radix-tree-nodes"),Integer xinfoStreamRadixTreeNodes,+                Bulk (Just "last-generated-id"),Bulk (Just xinfoStreamLastEntryId),+                Bulk (Just "groups"),Integer xinfoStreamNumGroups,+                Bulk (Just "first-entry"), rawFirstEntry ,+                Bulk (Just "last-entry"), rawLastEntry ])) = do+                    xinfoStreamFirstEntry <- decode rawFirstEntry+                    xinfoStreamLastEntry <- decode rawLastEntry+                    return XInfoStreamResponse{..}+            decodeRedis6 a = Left a  xinfoStream     :: (RedisCtx m f)
src/Database/Redis/Sentinel.hs view
@@ -1,10 +1,11 @@-{-# LANGUAGE BangPatterns      #-}-{-# LANGUAGE DeriveAnyClass    #-}-{-# LANGUAGE NamedFieldPuns    #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards   #-}-{-# LANGUAGE StrictData        #-}-{-# LANGUAGE TypeApplications  #-}+{-# LANGUAGE BangPatterns       #-}+{-# LANGUAGE DeriveAnyClass     #-}+{-# LANGUAGE NamedFieldPuns     #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE StrictData         #-}+{-# LANGUAGE TypeApplications   #-}+{-# LANGUAGE StandaloneDeriving #-}  -- | "Database.Redis" like interface with connection through Redis Sentinel. --@@ -215,4 +216,6 @@ data RedisSentinelException   = NoSentinels (NonEmpty (HostName, PortID))     -- ^ Thrown if no sentinel can be reached.-  deriving (Show, Typeable, Exception)+  deriving (Show, Typeable)++deriving instance Exception RedisSentinelException
test/Test.hs view
@@ -526,7 +526,7 @@      where connInfo = defaultConnectInfo { connectAuth = Just "pass" }           err = Left $ ConnectAuthError $-                  Error "ERR Client sent AUTH, but no password is set"+                  Error "ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?"  testConnectDb :: Test testConnectDb = testCase "connect/db" $ do