postgresql_cursor 0.6.10 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/postgresql_cursor/cursor.rb +5 -3
- data/lib/postgresql_cursor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c274e5d594957c08a12d1ba4808e0265a081b8f4904736548e5d61524c4cf12f
|
|
4
|
+
data.tar.gz: cef01d957175ccb3ac9a3866f456d4a502486cb734322b1acb9fa9a127494df6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33b45e046fe9ae45a6013b62d69894e8f4b129835588d9aeb297714fab9d1046de5c225bf0aa938577fb0ec7a9a67dbc5c07da53e3f8be59ddf1e7fdabfd4579
|
|
7
|
+
data.tar.gz: 2623728af17821817d33dc616fa921ef8b0f7c9ab5d4edf4d62de11bfaf1579dd1bde1388d9b2b990bc36bfe556de0398314af2ad839b80c657d3120e2c08e80
|
|
@@ -119,7 +119,7 @@ module PostgreSQLCursor
|
|
|
119
119
|
if ::ActiveRecord::VERSION::MAJOR < 4
|
|
120
120
|
model = klass.send(:instantiate, row)
|
|
121
121
|
else
|
|
122
|
-
@column_types ||= column_types
|
|
122
|
+
@column_types ||= column_types(klass)
|
|
123
123
|
model = klass.send(:instantiate, row, @column_types)
|
|
124
124
|
end
|
|
125
125
|
block.call(model)
|
|
@@ -153,7 +153,7 @@ module PostgreSQLCursor
|
|
|
153
153
|
if ::ActiveRecord::VERSION::MAJOR < 4
|
|
154
154
|
klass.send(:instantiate, row)
|
|
155
155
|
else
|
|
156
|
-
@column_types ||= column_types
|
|
156
|
+
@column_types ||= column_types(klass)
|
|
157
157
|
klass.send(:instantiate, row, @column_types)
|
|
158
158
|
end
|
|
159
159
|
end
|
|
@@ -228,7 +228,7 @@ module PostgreSQLCursor
|
|
|
228
228
|
row
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
-
def column_types
|
|
231
|
+
def column_types(klass)
|
|
232
232
|
return nil if ::ActiveRecord::VERSION::MAJOR < 4
|
|
233
233
|
return @column_types if @column_types
|
|
234
234
|
|
|
@@ -245,6 +245,8 @@ module PostgreSQLCursor
|
|
|
245
245
|
# types[fname] = @connection.get_type_map.fetch(ftype)
|
|
246
246
|
end
|
|
247
247
|
|
|
248
|
+
klass.attribute_types.each_key { |k| types.delete(k) }
|
|
249
|
+
|
|
248
250
|
@column_types = types
|
|
249
251
|
end
|
|
250
252
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postgresql_cursor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Allen Fair
|
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
147
|
- !ruby/object:Gem::Version
|
|
148
148
|
version: '0'
|
|
149
149
|
requirements: []
|
|
150
|
-
rubygems_version: 4.0.
|
|
150
|
+
rubygems_version: 4.0.10
|
|
151
151
|
specification_version: 4
|
|
152
152
|
summary: ActiveRecord PostgreSQL Adapter extension for using a cursor to return a
|
|
153
153
|
large result set
|