activerecord6-redshift-adapter 1.2.0 → 1.2.1

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
  SHA256:
3
- metadata.gz: 0dc8d364db3ea08cfe01d0eefb993b42c9099a799df7f8daf2dfd94259ac5c7a
4
- data.tar.gz: cba360ca422639049907bd642d2a1ea391e18c0619207ffc0eeb05ffedd94cff
3
+ metadata.gz: 9b6838020bc89ee6ffd8861657f32f98219011a7cf3f4592fc341704a866fff8
4
+ data.tar.gz: 232c5134bb175bc46a1762b7dc9a002bcd79656b7a7a20fef07aeea0b105e99d
5
5
  SHA512:
6
- metadata.gz: 19cd8ba355241a062c9a1dc06aaf29eb6baf94d716b4f3300644837ad90dfb2fa4c349a9ac816e5c66b899d965bb0057f6eaf5d2dad93f33c14e16eed6ba28cb
7
- data.tar.gz: b04c5d7c7a57cf69383b376b5714630f3f0ef2f43ac0a8ff980170c08cc0588d26d40f220b703c9ec3979f8bd8cd4843b11bdc9a3d62a5515004aa22049dfe21
6
+ metadata.gz: dad43df760170a8b2cfb967c17d0726fb66006f8f070d7b932dd66f415705dc53cbca96a227298c3781dc2f75c69f7806c7c08b90895837717f84b534a1ed927
7
+ data.tar.gz: 0db86869e3b6f4a02dcdbd2c28a92678e006e24d1f0bd95566dd8b7f3697e19d8c3edc7be4a514a24c36e7a77558317f5849663931b5916e6e20d6e2f2c56750
@@ -87,7 +87,14 @@ module ActiveRecord
87
87
 
88
88
  # Executes a SELECT query and returns an array of rows. Each row is an
89
89
  # array of field values.
90
- def select_rows(sql, name = nil, binds = [])
90
+ def select_rows(arel, name = nil, binds = [])
91
+ if respond_to?(:arel_from_relation, true)
92
+ arel = arel_from_relation(arel)
93
+ sql, binds = to_sql_and_binds(arel, [])
94
+ else
95
+ arel, binds = binds_from_relation arel, []
96
+ sql = to_sql(arel, binds)
97
+ end
91
98
  execute_and_clear(sql, name, binds) do |result|
92
99
  result.values
93
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord6-redshift-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nancy Foen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-05-16 00:00:00.000000000 Z
14
+ date: 2021-06-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: pg