partitioned 0.8.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +85 -36
- data/Rakefile +3 -0
- data/examples/README +46 -18
- data/lib/monkey_patch_activerecord.rb +14 -8
- data/lib/monkey_patch_postgres.rb +46 -13
- data/lib/partitioned/active_record_overrides.rb +13 -5
- data/lib/partitioned/bulk_methods_mixin.rb +91 -146
- data/lib/partitioned/by_created_at.rb +3 -1
- data/lib/partitioned/by_foreign_key.rb +5 -0
- data/lib/partitioned/by_id.rb +10 -4
- data/lib/partitioned/by_integer_field.rb +9 -0
- data/lib/partitioned/by_monthly_time_field.rb +8 -1
- data/lib/partitioned/by_time_field.rb +16 -8
- data/lib/partitioned/by_weekly_time_field.rb +6 -3
- data/lib/partitioned/multi_level/configurator/data.rb +1 -0
- data/lib/partitioned/multi_level/configurator/dsl.rb +11 -0
- data/lib/partitioned/multi_level/configurator/reader.rb +18 -0
- data/lib/partitioned/multi_level/partition_manager.rb +13 -4
- data/lib/partitioned/multi_level.rb +3 -1
- data/lib/partitioned/partitioned_base/configurator/data.rb +10 -1
- data/lib/partitioned/partitioned_base/configurator/dsl.rb +20 -15
- data/lib/partitioned/partitioned_base/configurator/reader.rb +3 -0
- data/lib/partitioned/partitioned_base/configurator.rb +4 -0
- data/lib/partitioned/partitioned_base/partition_manager.rb +17 -15
- data/lib/partitioned/partitioned_base/sql_adapter.rb +25 -23
- data/lib/partitioned/partitioned_base.rb +112 -41
- data/lib/partitioned/version.rb +2 -1
- data/partitioned.gemspec +3 -2
- metadata +68 -73
@@ -1,9 +1,10 @@
|
|
1
1
|
#
|
2
2
|
# :include: ../../README
|
3
3
|
#
|
4
|
+
|
4
5
|
module Partitioned
|
5
6
|
#
|
6
|
-
#
|
7
|
+
# Used by PartitionedBase class methods that must be overridden.
|
7
8
|
#
|
8
9
|
class MethodNotImplemented < StandardError
|
9
10
|
def initialize(model, method_name, is_class_method = true)
|
@@ -16,11 +17,11 @@ module Partitioned
|
|
16
17
|
# an ActiveRecord::Base class that can be partitioned.
|
17
18
|
#
|
18
19
|
# Uses a domain specific language to configure, see Partitioned::PartitionedBase::Configurator
|
19
|
-
# for more information
|
20
|
+
# for more information.
|
20
21
|
#
|
21
|
-
# Extends Partitioned::BulkMethodsMixin to provide create_many and update_many
|
22
|
+
# Extends Partitioned::BulkMethodsMixin to provide create_many and update_many.
|
22
23
|
#
|
23
|
-
# Uses PartitionManager to manage creation of child tables
|
24
|
+
# Uses PartitionManager to manage creation of child tables.
|
24
25
|
#
|
25
26
|
# Monkey patches some ActiveRecord routines to call back to this class when INSERT and UPDATE
|
26
27
|
# statements are built (to determine the table_name with respect to values being inserted or updated)
|
@@ -32,69 +33,86 @@ module Partitioned
|
|
32
33
|
self.abstract_class = true
|
33
34
|
|
34
35
|
#
|
35
|
-
#
|
36
|
+
# Returns an array of attribute names (strings) used to fetch the key value(s)
|
36
37
|
# the determine this specific partition table.
|
37
38
|
#
|
39
|
+
# @return [String] the column name used to partition this table
|
40
|
+
# @return [Array<String>] the column names used to partition this table
|
38
41
|
def self.partition_keys
|
39
42
|
return configurator.on_fields
|
40
43
|
end
|
41
44
|
|
42
45
|
#
|
43
|
-
#
|
44
|
-
# #partition_keys
|
46
|
+
# The specific values for a partition of this active record's type which are defined by
|
47
|
+
# {#self.partition_keys}
|
45
48
|
#
|
49
|
+
# @param [Hash] values key/value pairs to extract values from
|
50
|
+
# @return [Object] value of partition key
|
51
|
+
# @return [Array<Object>] values of partition keys
|
46
52
|
def self.partition_key_values(values)
|
47
53
|
symbolized_values = values.symbolize_keys
|
48
54
|
return self.partition_keys.map{|key| symbolized_values[key.to_sym]}
|
49
55
|
end
|
50
56
|
|
51
57
|
#
|
52
|
-
#
|
58
|
+
# The name of the current partition table determined by this active records attributes that
|
53
59
|
# define the key value(s) for the constraint check.
|
54
60
|
#
|
61
|
+
# @return [String] the fully qualified name of the database table, ie: foos_partitions.p17
|
55
62
|
def partition_table_name
|
56
63
|
symbolized_attributes = attributes.symbolize_keys
|
57
64
|
return self.class.partition_name(*self.class.partition_keys.map{|attribute_name| symbolized_attributes[attribute_name]})
|
58
65
|
end
|
59
66
|
|
60
67
|
#
|
61
|
-
#
|
62
|
-
# a time field to group the times by month.
|
68
|
+
# Normalize the value to be used for partitioning. This allows, for instance, a class that partitions on
|
69
|
+
# a time field to group the times by month. An integer field might be grouped by every 10mil values, A
|
63
70
|
# string field might be grouped by its first character.
|
64
71
|
#
|
72
|
+
# @param [Object] value the partition key value
|
73
|
+
# @return [Object] the normalized value for the key value passed in
|
65
74
|
def self.partition_normalize_key_value(value)
|
66
75
|
return value
|
67
76
|
end
|
68
77
|
|
69
78
|
#
|
70
|
-
#
|
79
|
+
# Range generation provided for methods like created_infrastructure that need a set of partition key values
|
71
80
|
# to operate on.
|
72
81
|
#
|
82
|
+
# @param [Object] start_value the first value to generate the range from
|
83
|
+
# @param [Object] end_value the last value to generate the range from
|
84
|
+
# @param [Object] step (1) number of values to advance.
|
85
|
+
# @return [Enumerable] the range generated
|
73
86
|
def self.partition_generate_range(start_value, end_value, step = 1)
|
74
87
|
return Range.new(start_value, end_value).step(step)
|
75
88
|
end
|
76
89
|
|
77
90
|
#
|
78
|
-
#
|
91
|
+
# Return an instance of this partition table's table manager.
|
79
92
|
#
|
93
|
+
# @return [{PartitionManager}] the partition manager for this partitioned model
|
80
94
|
def self.partition_manager
|
81
95
|
@partition_manager = self::PartitionManager.new(self) unless @partition_manager.present?
|
82
96
|
return @partition_manager
|
83
97
|
end
|
84
98
|
|
85
99
|
#
|
86
|
-
#
|
100
|
+
# Return an instance of this partition table's sql_adapter (used by the partition manage to
|
87
101
|
# create SQL statements)
|
88
102
|
#
|
103
|
+
# @return [{SqlAdapter}] the object used to create sql statements for this partitioned model
|
89
104
|
def self.sql_adapter
|
90
105
|
@sql_adapter = self::SqlAdapter.new(self) unless @sql_adapter.present?
|
91
106
|
return @sql_adapter
|
92
107
|
end
|
93
108
|
|
94
109
|
#
|
95
|
-
#
|
110
|
+
# In activerecord 3.0 we need to supply an Arel::Table for the key value(s) used
|
96
111
|
# to determine the specific child table to access.
|
97
112
|
#
|
113
|
+
# @param [Hash] values key/value pairs for all attributes
|
114
|
+
# @param [String] as (nil) the name of the table associated with this Arel::Table
|
115
|
+
# @return [Arel::Table] the generated Arel::Table
|
98
116
|
def self.dynamic_arel_table(values, as = nil)
|
99
117
|
@arel_tables ||= {}
|
100
118
|
key_values = self.partition_key_values(values)
|
@@ -106,9 +124,11 @@ module Partitioned
|
|
106
124
|
end
|
107
125
|
|
108
126
|
#
|
109
|
-
#
|
127
|
+
# Used by our active record hacks to supply an Arel::Table given this active record's
|
110
128
|
# current attributes.
|
111
129
|
#
|
130
|
+
# @param [String] as (nil) the name of the table associated with the Arel::Table
|
131
|
+
# @return [Arel::Table] the generated Arel::Table
|
112
132
|
def dynamic_arel_table(as = nil)
|
113
133
|
symbolized_attributes = attributes.symbolize_keys
|
114
134
|
key_values = Hash[*self.class.partition_keys.map{|name| [name,symbolized_attributes[name]]}.flatten]
|
@@ -118,6 +138,8 @@ module Partitioned
|
|
118
138
|
# :from_partition_scope is generally not used directly,
|
119
139
|
# use helper self.from_partition so that the derived class
|
120
140
|
# can be passed into :from_partition_scope
|
141
|
+
#
|
142
|
+
# @return [Hash] the from scoping
|
121
143
|
scope :from_partition_scope, lambda { |target_class, *partition_field|
|
122
144
|
{
|
123
145
|
:from => "#{target_class.partition_name(*partition_field)} AS #{target_class.table_name}"
|
@@ -125,7 +147,7 @@ module Partitioned
|
|
125
147
|
}
|
126
148
|
|
127
149
|
#
|
128
|
-
#
|
150
|
+
# Real scope (uses #from_partition_scope). This scope is used to target the
|
129
151
|
# active record find() to a specific child table and alias it to the name of the
|
130
152
|
# parent table (so activerecord can generally work with it)
|
131
153
|
#
|
@@ -139,6 +161,8 @@ module Partitioned
|
|
139
161
|
# class methods is not inherited, one must use this form (#from_partition) instead
|
140
162
|
# of #from_partition_scope to get the most derived classes specific active record scope.
|
141
163
|
#
|
164
|
+
# @param [*Array<Object>] partition_field the field values to partition on
|
165
|
+
# @return [Hash] the scoping
|
142
166
|
def self.from_partition(*partition_field)
|
143
167
|
from_partition_scope(self, *partition_field)
|
144
168
|
end
|
@@ -146,6 +170,8 @@ module Partitioned
|
|
146
170
|
# :from_partitioned_without_alias_scope is generally not used directly,
|
147
171
|
# use helper self.from_partitioned_without_alias so that the derived class
|
148
172
|
# can be passed into :from_partitioned_without_alias_scope
|
173
|
+
#
|
174
|
+
# @return [Hash] the from scoping
|
149
175
|
scope :from_partitioned_without_alias_scope, lambda { |target_class, *partition_field|
|
150
176
|
{
|
151
177
|
:from => target_class.partition_name(*partition_field)
|
@@ -153,7 +179,7 @@ module Partitioned
|
|
153
179
|
}
|
154
180
|
|
155
181
|
#
|
156
|
-
#
|
182
|
+
# Real scope (uses #from_partitioned_without_alias_scope). This scope is used to target the
|
157
183
|
# active record find() to a specific child table. Is probably best used in advanced
|
158
184
|
# activerecord queries when a number of tables are involved in the query.
|
159
185
|
#
|
@@ -176,13 +202,16 @@ module Partitioned
|
|
176
202
|
# class methods is not inherited, one must use this form (#from_partitioned_without_alias) instead
|
177
203
|
# of #from_partitioned_without_alias_scope to get the most derived classes specific active record scope.
|
178
204
|
#
|
205
|
+
# @param [*Array<Object>] partition_field the field values to partition on
|
206
|
+
# @return [Hash] the scoping
|
179
207
|
def self.from_partitioned_without_alias(*partition_field)
|
180
208
|
from_partitioned_without_alias_scope(self, *partition_field)
|
181
209
|
end
|
182
210
|
|
183
211
|
#
|
184
|
-
#
|
212
|
+
# Return a object used to read configurator information.
|
185
213
|
#
|
214
|
+
# @return [{Configurator::Reader}] the configuration reader for this partitioned model
|
186
215
|
def self.configurator
|
187
216
|
unless @configurator
|
188
217
|
@configurator = self::Configurator::Reader.new(self)
|
@@ -191,7 +220,7 @@ module Partitioned
|
|
191
220
|
end
|
192
221
|
|
193
222
|
#
|
194
|
-
#
|
223
|
+
# Yields an object used to configure the ActiveRecord class for partitioning
|
195
224
|
# using the Configurator Domain Specific Language.
|
196
225
|
#
|
197
226
|
# usage:
|
@@ -201,42 +230,45 @@ module Partitioned
|
|
201
230
|
# partition.foreign_key :company_id
|
202
231
|
# end
|
203
232
|
#
|
233
|
+
# @return [{Configurator::Dsl}] the Domain Specifical Language UI manager
|
204
234
|
def self.partitioned
|
205
235
|
@configurator_dsl ||= self::Configurator::Dsl.new(self)
|
206
236
|
yield @configurator_dsl
|
207
237
|
end
|
208
238
|
|
209
239
|
#
|
210
|
-
#
|
240
|
+
# Returns the configurator DSL object.
|
211
241
|
#
|
242
|
+
# @return [{Configurator::Dsl}] the Domain Specifical Language UI manager
|
212
243
|
def self.configurator_dsl
|
213
244
|
return @configurator_dsl
|
214
245
|
end
|
215
246
|
|
216
247
|
partitioned do |partition|
|
217
248
|
#
|
218
|
-
#
|
249
|
+
# The schema name to place all child tables.
|
219
250
|
#
|
220
|
-
#
|
221
|
-
#
|
251
|
+
# By default this will be the table name of the parent class with a suffix "_partitions".
|
252
|
+
#
|
253
|
+
# For a parent table name foos, that would be foos_partitions
|
222
254
|
#
|
223
255
|
partition.schema_name lambda {|model|
|
224
256
|
return model.table_name + '_partitions'
|
225
257
|
}
|
226
258
|
|
227
259
|
#
|
228
|
-
#
|
260
|
+
# The table name of the table who is the direct ancestor of a child table.
|
229
261
|
# The child table is defined by the partition key values passed in.
|
230
262
|
#
|
231
263
|
# By default this is just the active record's notion of the name of the class.
|
232
|
-
# Multi Level
|
264
|
+
# Multi Level partitioning requires more work.
|
233
265
|
#
|
234
266
|
partition.parent_table_name lambda {|model, *partition_key_values|
|
235
267
|
return model.table_name
|
236
268
|
}
|
237
269
|
|
238
270
|
#
|
239
|
-
#
|
271
|
+
# The schema name of the table who is the direct ancestor of a child table.
|
240
272
|
# The child table is defined by the partition key values passed in.
|
241
273
|
#
|
242
274
|
partition.parent_table_schema_name lambda {|model, *partition_key_values|
|
@@ -245,15 +277,15 @@ module Partitioned
|
|
245
277
|
}
|
246
278
|
|
247
279
|
#
|
248
|
-
#
|
280
|
+
# The prefix for a child table's name. This is typically a letter ('p') so that
|
249
281
|
# the base_name of the table can be a number generated programtically from
|
250
282
|
# the partition key values.
|
251
283
|
#
|
252
|
-
#
|
284
|
+
# For instance, a child table of the table 'foos' may be partitioned on
|
253
285
|
# the column company_id whose value is 42. specific child table would be named
|
254
286
|
# 'foos_partitions.p42'
|
255
287
|
#
|
256
|
-
#
|
288
|
+
# The 'p' is the name_prefix because 'foos_partitions.42' is not a valid table name
|
257
289
|
# (without quoting).
|
258
290
|
#
|
259
291
|
partition.name_prefix lambda {|model, *partition_key_values|
|
@@ -261,7 +293,7 @@ module Partitioned
|
|
261
293
|
}
|
262
294
|
|
263
295
|
#
|
264
|
-
#
|
296
|
+
# The child tables name without the schema name.
|
265
297
|
#
|
266
298
|
partition.part_name lambda {|model, *partition_key_values|
|
267
299
|
configurator = model.configurator
|
@@ -269,7 +301,7 @@ module Partitioned
|
|
269
301
|
}
|
270
302
|
|
271
303
|
#
|
272
|
-
#
|
304
|
+
# The full name of a child table defined by the partition key values.
|
273
305
|
#
|
274
306
|
partition.table_name lambda {|model, *partition_key_values|
|
275
307
|
configurator = model.configurator
|
@@ -277,78 +309,117 @@ module Partitioned
|
|
277
309
|
}
|
278
310
|
|
279
311
|
#
|
280
|
-
#
|
312
|
+
# The name of the child table without a schema name or prefix. this is used to
|
281
313
|
# build child table names for multi-level partitions.
|
282
314
|
#
|
283
|
-
#
|
315
|
+
# For a table named foos_partitions.p42, this would be "42"
|
284
316
|
#
|
285
317
|
partition.base_name lambda { |model, *partition_key_values|
|
286
318
|
return model.partition_normalize_key_value(*partition_key_values).to_s
|
287
319
|
}
|
288
320
|
end
|
289
321
|
|
322
|
+
#
|
323
|
+
# this methods are hand delegated because forwardable module conflicts
|
324
|
+
# with rails delegate.
|
325
|
+
#
|
326
|
+
|
290
327
|
##
|
291
328
|
# :singleton-method: drop_partition_table
|
292
329
|
# delegated to Partitioned::PartitionedBase::PartitionManager#drop_partition_table
|
330
|
+
def self.drop_partition_table(*partition_key_values)
|
331
|
+
partition_manager.drop_partition_table(*partition_key_values)
|
332
|
+
end
|
293
333
|
|
294
334
|
##
|
295
335
|
# :singleton-method: create_partition_table
|
296
336
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_partition_table
|
337
|
+
def self.create_partition_table(*partition_key_values)
|
338
|
+
partition_manager.create_partition_table(*partition_key_values)
|
339
|
+
end
|
297
340
|
|
298
341
|
##
|
299
342
|
# :singleton-method: add_partition_table_index
|
300
343
|
# delegated to Partitioned::PartitionedBase::PartitionManager#add_partition_table_index
|
344
|
+
def self.add_partition_table_index(*partition_key_values)
|
345
|
+
partition_manager.add_partition_table_index(*partition_key_values)
|
346
|
+
end
|
301
347
|
|
302
348
|
##
|
303
349
|
# :singleton-method: add_references_to_partition_table
|
304
350
|
# delegated to Partitioned::PartitionedBase::PartitionManager#add_references_to_partition_table
|
351
|
+
def self.add_references_to_partition_table(*partition_key_values)
|
352
|
+
partition_manager.add_references_to_partition_table(*partition_key_values)
|
353
|
+
end
|
305
354
|
|
306
355
|
##
|
307
356
|
# :method: create_partition_schema
|
308
357
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_partition_schema
|
358
|
+
def self.create_partition_schema(*partition_key_values)
|
359
|
+
partition_manager.create_partition_schema(*partition_key_values)
|
360
|
+
end
|
309
361
|
|
310
362
|
##
|
311
363
|
# :singleton-method: add_parent_table_rules
|
312
364
|
# delegated to Partitioned::PartitionedBase::PartitionManager#add_parent_table_rules
|
365
|
+
def self.add_parent_table_rules(*partition_key_values)
|
366
|
+
partition_manager.add_parent_table_rules(*partition_key_values)
|
367
|
+
end
|
313
368
|
|
314
369
|
##
|
315
370
|
# :method: drop_old_partitions
|
316
371
|
# delegated to Partitioned::PartitionedBase::PartitionManager#drop_old_partitions
|
372
|
+
def self.drop_old_partitions
|
373
|
+
partition_manager.drop_old_partitions
|
374
|
+
end
|
317
375
|
|
318
376
|
##
|
319
377
|
# :method: create_new_partitions
|
320
378
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_new_partitions
|
379
|
+
def self.create_new_partitions
|
380
|
+
partition_manager.create_new_partitions
|
381
|
+
end
|
321
382
|
|
322
383
|
##
|
323
384
|
# :method: drop_old_partition
|
324
385
|
# delegated to Partitioned::PartitionedBase::PartitionManager#drop_old_partition
|
386
|
+
def self.drop_old_partition(*partition_key_values)
|
387
|
+
partition_manager.drop_old_partition(*partition_key_values)
|
388
|
+
end
|
325
389
|
|
326
390
|
##
|
327
391
|
# :method: create_new_partition
|
328
392
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_new_partition
|
393
|
+
def self.create_new_partition(*partition_key_values)
|
394
|
+
partition_manager.create_new_partition(*partition_key_values)
|
395
|
+
end
|
329
396
|
|
330
397
|
##
|
331
398
|
# :method: create_new_partition_tables
|
332
399
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_new_partition_tables
|
400
|
+
def self.create_new_partition_tables(enumerable)
|
401
|
+
partition_manager.create_new_partition_tables(enumerable)
|
402
|
+
end
|
333
403
|
|
334
404
|
##
|
335
405
|
# :method: create_infrastructure
|
336
406
|
# delegated to Partitioned::PartitionedBase::PartitionManager#create_infrastructure
|
407
|
+
def self.create_infrastructure
|
408
|
+
partition_manager.create_infrastructure
|
409
|
+
end
|
337
410
|
|
338
411
|
##
|
339
412
|
# :method: partition_table_name
|
340
413
|
# delegated to Partitioned::PartitionedBase::PartitionManager#partition_table_name
|
414
|
+
def self.partition_table_name(*partition_key_values)
|
415
|
+
return partition_manager.partition_table_name(*partition_key_values)
|
416
|
+
end
|
341
417
|
|
342
418
|
##
|
343
419
|
# :method: partition_name
|
344
420
|
# delegated to Partitioned::PartitionedBase::PartitionManager#partition_table_name
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
:add_partition_table_index, :add_references_to_partition_table,
|
349
|
-
:create_partition_schema, :add_parent_table_rules, :drop_old_partitions,
|
350
|
-
:create_new_partitions, :drop_old_partition, :create_new_partition,
|
351
|
-
:create_new_partition_tables, :create_infrastructure, :partition_table_name
|
352
|
-
def_delegator :partition_manager, :partition_table_name, :partition_name
|
421
|
+
def self.partition_name(*partition_key_values)
|
422
|
+
return partition_manager.partition_table_name(*partition_key_values)
|
423
|
+
end
|
353
424
|
end
|
354
425
|
end
|
data/lib/partitioned/version.rb
CHANGED
data/partitioned.gemspec
CHANGED
@@ -6,15 +6,16 @@ require "partitioned/version"
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'partitioned'
|
8
8
|
s.version = Partitioned::VERSION
|
9
|
+
s.license = 'New BSD License'
|
9
10
|
s.date = '2012-03-07'
|
10
11
|
s.summary = "Postgres table partitioning support for ActiveRecord."
|
11
|
-
s.description = "A gem providing support for table partitioning in ActiveRecord.
|
12
|
+
s.description = "A gem providing support for table partitioning in ActiveRecord. Support is only available for postgres databases. Other features include child table management (creation and deletion) and bulk data creating and updating."
|
12
13
|
s.authors = ["Keith Gabryelski", "Aleksandr Dembskiy"]
|
13
14
|
s.email = 'keith@fiksu.com'
|
14
15
|
s.files = `git ls-files`.split("\n")
|
15
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
17
|
s.require_path = 'lib'
|
17
|
-
s.homepage = 'http://
|
18
|
+
s.homepage = 'http://github.com/fiksu/partitioned'
|
18
19
|
s.add_dependency('pg')
|
19
20
|
s.add_dependency "rails", '>= 3.0.0'
|
20
21
|
s.add_dependency('rspec-rails')
|
metadata
CHANGED
@@ -1,76 +1,73 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: partitioned
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
- 0
|
10
|
-
version: 0.8.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Keith Gabryelski
|
14
9
|
- Aleksandr Dembskiy
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-03-07 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
22
16
|
name: pg
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
25
18
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
33
23
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rails
|
37
24
|
prerelease: false
|
38
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
26
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rails
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
48
38
|
version: 3.0.0
|
49
39
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rspec-rails
|
53
40
|
prerelease: false
|
54
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
42
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec-rails
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
63
55
|
type: :runtime
|
64
|
-
|
65
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
description: A gem providing support for table partitioning in ActiveRecord. Support
|
64
|
+
is only available for postgres databases. Other features include child table management
|
65
|
+
(creation and deletion) and bulk data creating and updating.
|
66
66
|
email: keith@fiksu.com
|
67
67
|
executables: []
|
68
|
-
|
69
68
|
extensions: []
|
70
|
-
|
71
69
|
extra_rdoc_files: []
|
72
|
-
|
73
|
-
files:
|
70
|
+
files:
|
74
71
|
- Gemfile
|
75
72
|
- LICENSE
|
76
73
|
- PARTITIONING_EXPLAINED.txt
|
@@ -165,40 +162,38 @@ files:
|
|
165
162
|
- spec/support/shared_example_spec_helper_for_integer_key.rb
|
166
163
|
- spec/support/shared_example_spec_helper_for_time_key.rb
|
167
164
|
- spec/support/tables_spec_helper.rb
|
168
|
-
homepage: http://
|
169
|
-
licenses:
|
170
|
-
|
165
|
+
homepage: http://github.com/fiksu/partitioned
|
166
|
+
licenses:
|
167
|
+
- New BSD License
|
171
168
|
post_install_message:
|
172
169
|
rdoc_options: []
|
173
|
-
|
174
|
-
require_paths:
|
170
|
+
require_paths:
|
175
171
|
- lib
|
176
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
173
|
none: false
|
178
|
-
requirements:
|
179
|
-
- -
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
|
182
|
-
segments:
|
174
|
+
requirements:
|
175
|
+
- - ! '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
segments:
|
183
179
|
- 0
|
184
|
-
|
185
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
+
hash: -2034428678854769428
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
182
|
none: false
|
187
|
-
requirements:
|
188
|
-
- -
|
189
|
-
- !ruby/object:Gem::Version
|
190
|
-
|
191
|
-
segments:
|
183
|
+
requirements:
|
184
|
+
- - ! '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
segments:
|
192
188
|
- 0
|
193
|
-
|
189
|
+
hash: -2034428678854769428
|
194
190
|
requirements: []
|
195
|
-
|
196
191
|
rubyforge_project:
|
197
|
-
rubygems_version: 1.8.
|
192
|
+
rubygems_version: 1.8.24
|
198
193
|
signing_key:
|
199
194
|
specification_version: 3
|
200
195
|
summary: Postgres table partitioning support for ActiveRecord.
|
201
|
-
test_files:
|
196
|
+
test_files:
|
202
197
|
- spec/dummy/.rspec
|
203
198
|
- spec/dummy/README.rdoc
|
204
199
|
- spec/dummy/Rakefile
|