Class: ActiveRecord::Turntable::Mixer::Fader::UpdateShardsMergeResult
- Inherits:
-
ActiveRecord::Turntable::Mixer::Fader
- Object
- ActiveRecord::Turntable::Mixer::Fader
- ActiveRecord::Turntable::Mixer::Fader::UpdateShardsMergeResult
- Defined in:
- lib/active_record/turntable/mixer/fader/update_shards_merge_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 13 |
# File 'lib/active_record/turntable/mixer/fader/update_shards_merge_result.rb', line 5 def execute @proxy.shards_transaction(@shards_query_hash.keys) do @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.inject(&:+) end end |