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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bb0ba3d4223d4f8ba5ff0ee0680a74f625d8a6b
|
4
|
+
data.tar.gz: 54a8acd9478b085803aeec26b898026ad130578a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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/
|
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 "
|
10
|
-
|
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
|
data/sample/config.yaml
CHANGED
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.
|
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/
|
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
|