module Redis::Commands::SortedSets

def zrangebyscore(key, min, max, withscores: false, with_scores: withscores, limit: nil)

Returns:
  • (Array, Array<[String, Float]>) -

Parameters:
  • options (Hash) --
  • max (String) --
  • min (String) --
  • key (String) --

Other tags:
    Example: Retrieve members and their scores with scores `> 5` -
    Example: Retrieve the first 2 members with score `>= 0` -
    Example: Retrieve members with score `>= 5` and `< 100` -
def zrangebyscore(key, min, max, withscores: false, with_scores: withscores, limit: nil)
  args = [:zrangebyscore, key, min, max]
  if with_scores
    args << "WITHSCORES"
    block = FloatifyPairs
  end
  if limit
    args << "LIMIT"
    args.concat(limit)
  end
  send_command(args, &block)
end