partitioned 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/monkey_patch_activerecord.rb +19 -0
- data/lib/partitioned/version.rb +1 -1
- data/partitioned.gemspec +3 -3
- metadata +6 -5
@@ -3,6 +3,7 @@ require 'active_record/base'
|
|
3
3
|
require 'active_record/connection_adapters/abstract_adapter'
|
4
4
|
require 'active_record/relation.rb'
|
5
5
|
require 'active_record/persistence.rb'
|
6
|
+
require 'active_record/relation/query_methods.rb'
|
6
7
|
|
7
8
|
#
|
8
9
|
# Patching {ActiveRecord} to allow specifying the table name as a function of
|
@@ -71,6 +72,24 @@ module ActiveRecord
|
|
71
72
|
id
|
72
73
|
end
|
73
74
|
end
|
75
|
+
|
76
|
+
#
|
77
|
+
# A patch to QueryMethods to change default behavior of select
|
78
|
+
# to use the Relation's Arel::Table.
|
79
|
+
#
|
80
|
+
module QueryMethods
|
81
|
+
|
82
|
+
def build_select(arel, selects)
|
83
|
+
unless selects.empty?
|
84
|
+
@implicit_readonly = false
|
85
|
+
arel.project(*selects)
|
86
|
+
else
|
87
|
+
arel.project(table[Arel.star])
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
74
93
|
#
|
75
94
|
# Patches for relation to allow back hooks into the {ActiveRecord}
|
76
95
|
# requesting name of table as a function of attributes.
|
data/lib/partitioned/version.rb
CHANGED
data/partitioned.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'partitioned'
|
8
8
|
s.version = Partitioned::VERSION
|
9
9
|
s.license = 'New BSD License'
|
10
|
-
s.date = '2013-
|
10
|
+
s.date = '2013-04-25'
|
11
11
|
s.summary = "Postgres table partitioning support for ActiveRecord."
|
12
|
-
s.description = "A gem providing support for table partitioning in ActiveRecord. Support is
|
13
|
-
s.authors = ["Keith Gabryelski", "Aleksandr Dembskiy"]
|
12
|
+
s.description = "A gem providing support for table partitioning in ActiveRecord. Support is available for postgres and AWS RedShift databases. Other features include child table management (creation and deletion) and bulk data creating and updating."
|
13
|
+
s.authors = ["Keith Gabryelski", "Aleksandr Dembskiy", "Edward Slavich"]
|
14
14
|
s.email = 'keith@fiksu.com'
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: partitioned
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Keith Gabryelski
|
9
9
|
- Aleksandr Dembskiy
|
10
|
+
- Edward Slavich
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2013-
|
14
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: pg
|
@@ -93,8 +94,8 @@ dependencies:
|
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
description: A gem providing support for table partitioning in ActiveRecord. Support
|
96
|
-
is
|
97
|
-
(creation and deletion) and bulk data creating and updating.
|
97
|
+
is available for postgres and AWS RedShift databases. Other features include child
|
98
|
+
table management (creation and deletion) and bulk data creating and updating.
|
98
99
|
email: keith@fiksu.com
|
99
100
|
executables: []
|
100
101
|
extensions: []
|
@@ -219,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
220
|
version: '0'
|
220
221
|
requirements: []
|
221
222
|
rubyforge_project:
|
222
|
-
rubygems_version: 1.8.
|
223
|
+
rubygems_version: 1.8.25
|
223
224
|
signing_key:
|
224
225
|
specification_version: 3
|
225
226
|
summary: Postgres table partitioning support for ActiveRecord.
|