activerecord-bigquery-adapter 1.0.2 → 1.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ffb09b5886b5c6d0b1b76dcc6383fecd466ecc3873faeca8d568f0a16d17a38
|
4
|
+
data.tar.gz: 8e7126edd9c199cf96ba40cecc4cfb349337596dc13fdd599b69927454ae4587
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6171c3524214ab3716f18cf50bb930c560e901f2d2c89188bc43a7ce9b34e3993f2a8668c82b3de0e8381bda963c282b03aa284ae6988a7593037b0d2f51df73
|
7
|
+
data.tar.gz: c510dc7eed66f52138b9653df03707beafd94d76250b16203f00a1124cd58c59e03552dcd21be1ff828ce34c49eaf84012de031068944ca9cbf7dd3d20ee441d
|
@@ -12,8 +12,8 @@ module ActiveRecord
|
|
12
12
|
|
13
13
|
def exec_query(sql, name = 'SQL', binds = [], prepare: false)
|
14
14
|
result = execute(sql, name, binds)
|
15
|
-
|
16
|
-
schema.param_types.map { |key, sql_type| [key.to_s, lookup_cast_type(sql_type.to_s)] }.to_h
|
15
|
+
if schema = result.schema
|
16
|
+
column_types = schema.param_types.map { |key, sql_type| [key.to_s, lookup_cast_type(sql_type.to_s)] }.to_h
|
17
17
|
rows = result.all.collect { |row| row.values_at(*schema.headers) }
|
18
18
|
columns = schema.headers.map(&:to_s)
|
19
19
|
ActiveRecord::Result.new(columns, rows, column_types)
|