mysql-partitioner 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c12cd0cf14e5682ab759b0ad8d96a244f02ba98
4
- data.tar.gz: 596afcec67f75b5139badadb3a5d0156b7bdb6dd
3
+ metadata.gz: 7bb0ba3d4223d4f8ba5ff0ee0680a74f625d8a6b
4
+ data.tar.gz: 54a8acd9478b085803aeec26b898026ad130578a
5
5
  SHA512:
6
- metadata.gz: e35851f77739dc321eb1df66345791fe07f3ba9f852ee6f87bb5e9c0c1cef2185b509756e872a1cf2618817fff69e30b636f5cac8164f7ee69c76acdf5cdd8e4
7
- data.tar.gz: 4c0f48e88261f3a2c799f36b4f8da2b549e58d090de1cbfb705b80b8c214f9da93faa7bdee8affab2802f71ed8c0a9ab4b1cf4dd8db93184643b423b2bf2d21c
6
+ metadata.gz: 4ec7efe09a2ff1d1d789d51c29e840a26716ebced29a84bf6676ec811750bb8d96d5cad7c7c817f4c93833dc202e552e01ce2f184778bf37ee8d5589991e7ad4
7
+ data.tar.gz: 14b136f672ecfd896eade781c49e0238ab60d0880ebc54be9f226a5c1a2e94c2f1ffe28d54d4360b722d7870a1ae5e9d494f4480d4f4d8c627c0ed954792e6e2
@@ -2,7 +2,7 @@ require 'mysql/partitioner/partition'
2
2
  module Mysql
3
3
  module Partitioner
4
4
  module Strategy
5
- class PartitionByRangeDropByTime
5
+ class PartitionByPkDropByTime
6
6
  def initialize(operation, config)
7
7
  @operation = operation or raise "operation not specified"
8
8
  @key = config[:key] or raise "Key not specified"
@@ -1,4 +1,4 @@
1
- require 'mysql/partitioner/strategy/partition_by_range_drop_by_time'
1
+ require 'mysql/partitioner/strategy/partition_by_pk_drop_by_time'
2
2
  require 'mysql/partitioner/operation'
3
3
 
4
4
  module Mysql
@@ -6,8 +6,8 @@ module Mysql
6
6
  module Strategy
7
7
  def self.build(session, table, config)
8
8
  case config[:name]
9
- when "partition_by_range_drop_by_time" then
10
- PartitionByRangeDropByTime.new(Mysql::Partitioner::Operation::Range.new(table, session), config)
9
+ when "partition_by_pk_drop_by_time" then
10
+ PartitionByPkDropByTime.new(Mysql::Partitioner::Operation::Range.new(table, session), config)
11
11
  else raise "Unknown strategy error"
12
12
  end
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module Mysql
2
2
  module Partitioner
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
data/sample/config.yaml CHANGED
@@ -6,7 +6,7 @@ sample1:
6
6
  password:
7
7
  table: partition_test
8
8
  strategy:
9
- name: partition_by_range_drop_by_time
9
+ name: partition_by_pk_drop_by_time
10
10
  key: id
11
11
  time_key: created_at
12
12
  range: 1000000
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql-partitioner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedama
@@ -122,7 +122,7 @@ files:
122
122
  - lib/mysql/partitioner/range.rb
123
123
  - lib/mysql/partitioner/session.rb
124
124
  - lib/mysql/partitioner/strategy.rb
125
- - lib/mysql/partitioner/strategy/partition_by_range_drop_by_time.rb
125
+ - lib/mysql/partitioner/strategy/partition_by_pk_drop_by_time.rb
126
126
  - lib/mysql/partitioner/version.rb
127
127
  - mysql-partitioner.gemspec
128
128
  - sample/config.yaml