Module: Mysql::Partitioner::Strategy

Defined in:
lib/mysql/partitioner/strategy.rb,
lib/mysql/partitioner/strategy/partition_by_pk_drop_by_time.rb

Defined Under Namespace

Classes: PartitionByPkDropByTime

Class Method Summary collapse

Class Method Details

.build(session, table, config) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/mysql/partitioner/strategy.rb', line 7

def self.build(session, table, config)
  case config[:name]
  when "partition_by_pk_drop_by_time" then
    PartitionByPkDropByTime.new(Mysql::Partitioner::Operation::Range.new(table, session), config)
  else raise "Unknown strategy error"
  end
end