motor-admin 0.2.17 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/motor/active_record_utils/types.rb +5 -2
- data/lib/motor/queries/run_query.rb +4 -4
- data/lib/motor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc4b3959711130ff5e711c91a8a3ae30f996dcbbf83c98a6d2bb108ffed665e6
|
4
|
+
data.tar.gz: c5090823346eb41d62bb400cce5b7c4c4c17b9a9261017aa374a31fa33ca3630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c46b67ac2fe96276806252c3c56e0472b32b6f91aa2351dd7d8ae76485de59260e2079dd42336c61beb1d28de9f6c0177e32e60d9a5e35c9b7dd8b9e770ff0bf
|
7
|
+
data.tar.gz: d49105316054eab5561cfbbad123cf4e106d7d837446cab63f91149f225022466c7ef3e10442e20789c4c920e9a222dbf27ad552a253cd23267e71356d34fa68
|
@@ -16,6 +16,7 @@ module Motor
|
|
16
16
|
'numeric' => 'float',
|
17
17
|
'decimal' => 'float',
|
18
18
|
'float4' => 'float',
|
19
|
+
'bpchar' => 'string',
|
19
20
|
'float8' => 'float',
|
20
21
|
'float16' => 'float',
|
21
22
|
'text' => 'string',
|
@@ -43,11 +44,13 @@ module Motor
|
|
43
44
|
|
44
45
|
return UNIFIED_TYPES.fetch(name, name) if name
|
45
46
|
|
46
|
-
|
47
|
+
nil
|
47
48
|
end
|
48
49
|
|
49
50
|
def build_types_hash
|
50
|
-
|
51
|
+
connection_class = defined?(::ResourceRecord) ? ::ResourceRecord : ActiveRecord::Base
|
52
|
+
|
53
|
+
type_map = connection_class.connection.send(:type_map)
|
51
54
|
|
52
55
|
type_map.instance_variable_get('@mapping').map do |name, type|
|
53
56
|
next unless name.is_a?(String)
|
@@ -86,10 +86,10 @@ module Motor
|
|
86
86
|
result.columns.map.with_index do |column_name, index|
|
87
87
|
column_type_class = result.column_types[column_name]
|
88
88
|
|
89
|
-
column_type =
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
column_type = ActiveRecordUtils::Types.find_name_for_type(column_type_class) if column_type_class
|
90
|
+
|
91
|
+
column_type ||=
|
92
|
+
begin
|
93
93
|
not_nil_value = result.rows.reduce(nil) do |acc, row|
|
94
94
|
column = row[index]
|
95
95
|
|
data/lib/motor/version.rb
CHANGED