Method: Redis#zunionstore
- Defined in:
- lib/redis.rb
#zunionstore(destination, keys, options = {}) ⇒ Fixnum
Add multiple sorted sets and store the resulting sorted set in a new key.
1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 |
# File 'lib/redis.rb', line 1755 def zunionstore(destination, keys, = {}) args = [] weights = [:weights] args.concat(["WEIGHTS"] + weights) if weights aggregate = [:aggregate] args.concat(["AGGREGATE", aggregate]) if aggregate synchronize do |client| client.call([:zunionstore, destination, keys.size] + keys + args) end end |