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.
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'lib/redis.rb', line 1186 def zunionstore(destination, keys, = {}) args = [] weights = [:weights] args.concat ["WEIGHTS", *weights] if weights aggregate = [:aggregate] args.concat ["AGGREGATE", aggregate] if aggregate synchronize do @client.call [:zunionstore, destination, keys.size, *(keys + args)] end end |