hedis 0.9.7 → 0.9.8
raw patch · 4 files changed
+14/−5 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +6/−1
- hedis.cabal +1/−1
- src/Database/Redis/ManualCommands.hs +3/−3
- test/Test.hs +4/−0
CHANGELOG view
@@ -1,8 +1,13 @@ # Changelog for Hedis +## 0.9.8++* Fix syntax errors from redis when using scanOpts to specify match+ pattern or count options (see PR #88)+ ## 0.9.7 -Expose returnDecode method of RedisCtx (see issue #83)+* Expose returnDecode method of RedisCtx (see issue #83) ## 0.9.2
hedis.cabal view
@@ -1,5 +1,5 @@ name: hedis-version: 0.9.7+version: 0.9.8 synopsis: Client library for the Redis datastore: supports full command set, pipelining.
src/Database/Redis/ManualCommands.hs view
@@ -699,9 +699,9 @@ addScanOpts cmd ScanOpts{..} = concat [cmd, match, count] where- match = maybeToList scanMatch- count = map encode $ maybeToList scanCount-+ prepend x y = [x, y]+ match = maybe [] (prepend "MATCH") scanMatch+ count = maybe [] ((prepend "COUNT").encode) scanCount sscan :: (RedisCtx m f)
test/Test.hs view
@@ -532,12 +532,16 @@ testScans = testCase "scans" $ do set "key" "value" >>=? Ok scan cursor0 >>=? (cursor0, ["key"])+ scanOpts cursor0 sOpts1 >>=? (cursor0, ["key"])+ scanOpts cursor0 sOpts2 >>=? (cursor0, []) sadd "set" ["1"] >>=? 1 sscan "set" cursor0 >>=? (cursor0, ["1"]) hset "hash" "k" "v" >>=? True hscan "hash" cursor0 >>=? (cursor0, [("k", "v")]) zadd "zset" [(42, "2")] >>=? 1 zscan "zset" cursor0 >>=? (cursor0, [("2", 42)])+ where sOpts1 = defaultScanOpts { scanMatch = Just "k*" }+ sOpts2 = defaultScanOpts { scanMatch = Just "not*"} testZrangelex ::Test testZrangelex = testCase "zrangebylex" $ do