Class: ActiveRecord::Turntable::Mixer::Fader::CalculateShardsSumResult
- Inherits:
-
ActiveRecord::Turntable::Mixer::Fader
- Object
- ActiveRecord::Turntable::Mixer::Fader
- ActiveRecord::Turntable::Mixer::Fader::CalculateShardsSumResult
- Defined in:
- lib/active_record/turntable/mixer/fader/calculate_shards_sum_result.rb
Instance Attribute Summary
Attributes inherited from ActiveRecord::Turntable::Mixer::Fader
#called_method, #query, #shards_query_hash
Instance Method Summary collapse
Methods inherited from ActiveRecord::Turntable::Mixer::Fader
Constructor Details
This class inherits a constructor from ActiveRecord::Turntable::Mixer::Fader
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/active_record/turntable/mixer/fader/calculate_shards_sum_result.rb', line 5 def execute results = @shards_query_hash.map do |shard, query| args = @args.dup args[1] = args[1].dup if args[1].present? shard.connection.send(@called_method, query, *@args, &@block) end merge_results(results) end |