activerecord-bigquery-adapter 1.0.0 → 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: 49da0eef052b651f2e6653de97962c1cbeb21144a47495646371efae29d8613e
4
- data.tar.gz: eeda61573a0362e9d001736249c36c16634d235a64e0b21af6e10a82dc4852d1
3
+ metadata.gz: 5ffb09b5886b5c6d0b1b76dcc6383fecd466ecc3873faeca8d568f0a16d17a38
4
+ data.tar.gz: 8e7126edd9c199cf96ba40cecc4cfb349337596dc13fdd599b69927454ae4587
5
5
  SHA512:
6
- metadata.gz: 6f871d4778e512b7e8dc81f72c1de74592f5dd2d4c70d8ee0edd61a0f12ef5ea7357031f34c658baa7d552df550a79e10a9e641b8dc27a2bfe1d560fa90866f3
7
- data.tar.gz: f164fc9f9f608c382b566bac9e270273815c069e3303bd5eb6f9e2d3aac9f1dd9ad0978cb6a6e1aae2e1ede74aef1c7dbd1dd159168e5806df0fc27929936282
6
+ metadata.gz: 6171c3524214ab3716f18cf50bb930c560e901f2d2c89188bc43a7ce9b34e3993f2a8668c82b3de0e8381bda963c282b03aa284ae6988a7593037b0d2f51df73
7
+ data.tar.gz: c510dc7eed66f52138b9653df03707beafd94d76250b16203f00a1124cd58c59e03552dcd21be1ff828ce34c49eaf84012de031068944ca9cbf7dd3d20ee441d
data/.gitignore CHANGED
@@ -1,11 +1,56 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
4
  /coverage/
5
- /doc/
5
+ /InstalledFiles
6
6
  /pkg/
7
7
  /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
8
11
  /tmp/
9
12
 
10
- # rspec failure tracking
11
- .rspec_status
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
@@ -12,10 +12,14 @@ module ActiveRecord
12
12
 
13
13
  def exec_query(sql, name = 'SQL', binds = [], prepare: false)
14
14
  result = execute(sql, name, binds)
15
- column_types = result.param_types.map { |key, sql_type| [key.to_s, lookup_cast_type(sql_type.to_s)] }.to_h
16
- rows = result.all.collect { |row| row.values_at(*result.headers) }
17
- columns = result.headers.map(&:to_s)
18
- ActiveRecord::Result.new(columns, rows, column_types)
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
+ 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)
20
+ else
21
+ ActiveRecord::Result.new([], [], {})
22
+ end
19
23
  end
20
24
 
21
25
  private
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordBigqueryAdapter
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.3'.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.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ventrata