Skip to content

Commit

Permalink
added zRange
Browse files Browse the repository at this point in the history
  • Loading branch information
Menno de Boer committed Aug 7, 2023
1 parent 94cdedd commit b84283e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Database/Redis/Schema.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Database.Redis.Schema
, day, hour, minute, second
, throw, throwMsg
, sInsert, sDelete, sContains, sSize
, Priority(..), zInsert, zSize, zCount, zDelete, zIncrBy, zPopMin, bzPopMin, zRangeByScoreLimit, zRevRange, zScanOpts, zUnionStoreWeights
, Priority(..), zInsert, zSize, zCount, zDelete, zIncrBy, zPopMin, bzPopMin, zRangeByScoreLimit, zRange, zRevRange, zScanOpts, zUnionStoreWeights
, txSInsert, txSDelete, txSContains, txSSize
, MapItem(..)
, RecordField(..), RecordItem(..), Record
Expand Down Expand Up @@ -1065,6 +1065,13 @@ zRangeByScoreLimit (toIdentifier -> keyBS) (Priority minV) (Priority maxV) offse
>>= expectRight "zrangebyscoreLimit call"
>>= expectRight "zrangebyscoreLimit decode" . fromBSMany

zRange :: forall ref a. (Ref ref, ValueType ref ~ [(Priority, a)], Serializable a)
=> ref -> Integer -> Integer -> RedisM (RefInstance ref) [a]
zRange (toIdentifier -> keyBS) start end =
Hedis.zrange keyBS start end
>>= expectRight "zrange call"
>>= expectRight "zrange decode" . fromBSMany

zRevRange :: forall ref a. (Ref ref, ValueType ref ~ [(Priority, a)], Serializable a)
=> ref -> Integer -> Integer -> RedisM (RefInstance ref) [a]
zRevRange (toIdentifier -> keyBS) start end =
Expand Down

0 comments on commit b84283e

Please sign in to comment.