activerecord-redshift-adapter 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,11 +2,7 @@
2
2
 
3
3
  adapter for aws redshift for rails 3
4
4
 
5
- ripped from rails 3 postgresql -- deleted code until it worked
6
-
7
- barely tested (I'm working on a project that needs this -- this works as much as I need to get the project moving)
8
-
9
- good luck
5
+ Ripped from rails 3 postgresql.
10
6
 
11
7
  ## example database.yml
12
8
  ```yml
@@ -50,6 +46,10 @@ redshift_development:
50
46
  </table>
51
47
  ```
52
48
 
49
+ ## Have you considered using Partitioned gem? It works with redshift!
50
+
51
+ https://github.com/fiksu/partitioned
52
+
53
53
  ## TableManager
54
54
 
55
55
  Helpful code to clone redshift tables
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.name = 'activerecord-redshift-adapter'
8
8
  s.version = ActiverecordRedshiftAdapter::VERSION
9
9
  s.license = 'New BSD License'
10
- s.date = '2013-09-17'
10
+ s.date = '2013-09-20'
11
11
  s.summary = "Rails 3 database adapter support for AWS RedShift."
12
12
  s.description = "This gem provides the Rails 3 with database adapter for AWS RedShift."
13
13
  s.authors = ["Keith Gabryelski"]
@@ -100,10 +100,12 @@ module ActiverecordRedshift
100
100
  end
101
101
  attnums = attnums.flatten.uniq
102
102
 
103
- sql = "select attname,attnum from pg_attribute where attrelid = #{table_oid} and attnum in (#{attnums.join(',')})"
104
103
  column_names = {}
105
- @connection.execute(sql).each do |row|
106
- column_names[row['attnum']] = row['attname']
104
+ if attnums.length > 0
105
+ sql = "select attname,attnum from pg_attribute where attrelid = #{table_oid} and attnum in (#{attnums.join(',')})"
106
+ @connection.execute(sql).each do |row|
107
+ column_names[row['attnum']] = row['attname']
108
+ end
107
109
  end
108
110
 
109
111
  with_search_path([schema_name]) do
@@ -1,4 +1,4 @@
1
1
  module ActiverecordRedshiftAdapter
2
2
  # the current version of this gem
3
- VERSION = "0.9.4"
3
+ VERSION = "0.9.5"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-redshift-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-17 00:00:00.000000000 Z
12
+ date: 2013-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 1.8.24
105
+ rubygems_version: 1.8.25
106
106
  signing_key:
107
107
  specification_version: 3
108
108
  summary: Rails 3 database adapter support for AWS RedShift.