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:
|
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
|
data/.gitignore
CHANGED
@@ -1,11 +1,56 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
4
|
/coverage/
|
5
|
-
/
|
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
|
-
#
|
11
|
-
.
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|