Sha256: f72e1da20b39cdfb121ed96f82fe9d53200928da8e0a9b8ca880e89270d6c8c3

Contents?: true

Size: 1.13 KB

Versions: 5

Compression:

Stored size: 1.13 KB

Contents

# -*- coding: utf-8 -*-
module ActiveRecord::Turntable
  class Mixer
    class Fader
      # 単数shard
      autoload :SpecifiedShard, "active_record/turntable/mixer/fader/specified_shard"

      # 複数shard
      autoload :SelectShardsMergeResult, "active_record/turntable/mixer/fader/select_shards_merge_result"
      autoload :InsertShardsMergeResult, "active_record/turntable/mixer/fader/insert_shards_merge_result"
      autoload :UpdateShardsMergeResult, "active_record/turntable/mixer/fader/update_shards_merge_result"

      # count
      autoload :CalculateShardsSumResult, "active_record/turntable/mixer/fader/calculate_shards_sum_result"

      attr_reader :shards_query_hash
      attr_reader :called_method
      attr_reader :query

      def initialize(proxy, shards_query_hash, called_method, query, *args, &block)
        @proxy = proxy
        @shards_query_hash = shards_query_hash
        @called_method = called_method
        @query = query
        @args = args
        @block = block
      end

      def execute
        raise ActiveRecord::Turntable::NotImplementedError, "Called abstract method"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activerecord-turntable-1.1.2 lib/active_record/turntable/mixer/fader.rb
activerecord-turntable-1.1.1 lib/active_record/turntable/mixer/fader.rb
activerecord-turntable-1.1.0 lib/active_record/turntable/mixer/fader.rb
activerecord-turntable-1.0.1 lib/active_record/turntable/mixer/fader.rb
activerecord-turntable-1.0.0 lib/active_record/turntable/mixer/fader.rb