activerecord-bigquery-adapter 1.0.0 → 1.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da3ab5e8c74b608f4d2e7a28f9b81610dffbd454612a479d71d277961ceedd4
|
4
|
+
data.tar.gz: 7f22204394adebc487da21d8827bd59da471cdd0a83d954ae91a93da3ac513c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ceebd5fd25409da2b1b1e7b3dd0d7cf0426d0a2aa43cbefb2d5b193f59093e04dfe3b6da69a27671713d65161fcd2bb3350ef89f9f19323205f70a97c22f338
|
7
|
+
data.tar.gz: 026fa5fabf8a8f385d885708a561b88a93d44ee467823bff3f6fb86d64d53d39d4975e874b49000ef567deba186a51242d7540029e6bd19c99eea8a79ed7e6bd
|
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,7 +12,12 @@ 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 =
|
15
|
+
column_types = if schema = result.schema
|
16
|
+
schema.param_types.map { |key, sql_type| [key.to_s, lookup_cast_type(sql_type.to_s)] }.to_h
|
17
|
+
else
|
18
|
+
{}
|
19
|
+
end
|
20
|
+
|
16
21
|
rows = result.all.collect { |row| row.values_at(*result.headers) }
|
17
22
|
columns = result.headers.map(&:to_s)
|
18
23
|
ActiveRecord::Result.new(columns, rows, column_types)
|