hedis 0.12.4 → 0.12.5
raw patch · 3 files changed
+17/−1 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Database.Redis: [slowlogClientIpAndPort] :: Slowlog -> Maybe ByteString
+ Database.Redis: [slowlogClientName] :: Slowlog -> Maybe ByteString
- Database.Redis: Slowlog :: Integer -> Integer -> Integer -> [ByteString] -> Slowlog
+ Database.Redis: Slowlog :: Integer -> Integer -> Integer -> [ByteString] -> Maybe ByteString -> Maybe ByteString -> Slowlog
Files
- CHANGELOG +4/−0
- hedis.cabal +1/−1
- src/Database/Redis/ManualCommands.hs +12/−0
CHANGELOG view
@@ -1,5 +1,9 @@ # Changelog for Hedis +## 0.12.5++Issue #136 fix slowlog parsing+ ## 0.12.4 * Add upper bound on network package
hedis.cabal view
@@ -1,5 +1,5 @@ name: hedis-version: 0.12.4+version: 0.12.5 synopsis: Client library for the Redis datastore: supports full command set, pipelining.
src/Database/Redis/ManualCommands.hs view
@@ -62,6 +62,8 @@ -- ^ The amount of time needed for its execution, in microseconds. , slowlogCmd :: [ByteString] -- ^ The command and it's arguments.+ , slowlogClientIpAndPort :: Maybe ByteString+ , slowlogClientName :: Maybe ByteString } deriving (Show, Eq) instance RedisResult Slowlog where@@ -70,6 +72,16 @@ slowlogTimestamp <- decode timestamp slowlogMicros <- decode micros slowlogCmd <- decode cmd+ let slowlogClientIpAndPort = Nothing+ slowlogClientName = Nothing+ return Slowlog{..}+ decode (MultiBulk (Just [logId,timestamp,micros,cmd,ip,cname])) = do+ slowlogId <- decode logId+ slowlogTimestamp <- decode timestamp+ slowlogMicros <- decode micros+ slowlogCmd <- decode cmd+ slowlogClientIpAndPort <- Just <$> decode ip+ slowlogClientName <- Just <$> decode cname return Slowlog{..} decode r = Left r