activerecord-bigquery-adapter 1.0.1 → 1.0.2

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: 9da3ab5e8c74b608f4d2e7a28f9b81610dffbd454612a479d71d277961ceedd4
4
- data.tar.gz: 7f22204394adebc487da21d8827bd59da471cdd0a83d954ae91a93da3ac513c9
3
+ metadata.gz: 37a60ae900d117737712160fb88e20aa993473cca112fd6df04967e953a86f60
4
+ data.tar.gz: 3c7a6815b560ae13f1c704104ade5791f9fd37a222c5bddef3ebc7fcbfddf7c9
5
5
  SHA512:
6
- metadata.gz: 5ceebd5fd25409da2b1b1e7b3dd0d7cf0426d0a2aa43cbefb2d5b193f59093e04dfe3b6da69a27671713d65161fcd2bb3350ef89f9f19323205f70a97c22f338
7
- data.tar.gz: 026fa5fabf8a8f385d885708a561b88a93d44ee467823bff3f6fb86d64d53d39d4975e874b49000ef567deba186a51242d7540029e6bd19c99eea8a79ed7e6bd
6
+ metadata.gz: 6c0dff7b640cabc726ad62f88767362a5c2fb6fd45532162c00330b96a941b6eea1e9a15da8a6de98bf2dfb11cd86050237ef4480bab0be35a5581aba6aed0de
7
+ data.tar.gz: b65047bffd9f03f502391211d9881f11f4d4873432f7d9322e8affa05be15797812fd3efa3e7dccb76f95f5e39ea4a5403d47a7234a54632421535910bd56904
@@ -14,13 +14,12 @@ module ActiveRecord
14
14
  result = execute(sql, name, binds)
15
15
  column_types = if schema = result.schema
16
16
  schema.param_types.map { |key, sql_type| [key.to_s, lookup_cast_type(sql_type.to_s)] }.to_h
17
+ rows = result.all.collect { |row| row.values_at(*schema.headers) }
18
+ columns = schema.headers.map(&:to_s)
19
+ ActiveRecord::Result.new(columns, rows, column_types)
17
20
  else
18
- {}
21
+ ActiveRecord::Result.new([], [], {})
19
22
  end
20
-
21
- rows = result.all.collect { |row| row.values_at(*result.headers) }
22
- columns = result.headers.map(&:to_s)
23
- ActiveRecord::Result.new(columns, rows, column_types)
24
23
  end
25
24
 
26
25
  private
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordBigqueryAdapter
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-bigquery-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ventrata