miscellany 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miscellany/active_record/complex_query.rb +2 -2
- data/lib/miscellany/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: 7ec30930b46e2c70b23b56abcf878afe159e0f18ffb3233c7ab1e87de6483573
|
4
|
+
data.tar.gz: b4eea0d8cb2ea1dfc0b3d52351f63fd54dcb9581ed877967ea78beb5cbc96a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a2d235b7ea3e209b0249eab4964eb3f2426e2de48c7ac6594a06fb077bae34f7df160ff9f7b8bd797fc2a1d47a2cf8f63cf223f45ef71e4899884fd43dd0c6
|
7
|
+
data.tar.gz: ee1e2a42ce1376ecd3a182e0aa228b248e154b554fcd9fdf6126a4c42855db20e83063b6a71ecd291c7a3fedfc6aa409b001a5d998e78ec8357c0e50d24f6941
|
@@ -47,7 +47,7 @@ module Miscellany
|
|
47
47
|
end
|
48
48
|
psql += " LIMIT #{length} OFFSET #{start}"
|
49
49
|
records = ActiveRecord::Base.connection.exec_query(psql).to_a
|
50
|
-
records.map
|
50
|
+
records = records.map(&:with_indifferent_access)
|
51
51
|
augment_batch(records)
|
52
52
|
records
|
53
53
|
end
|
@@ -63,7 +63,7 @@ module Miscellany
|
|
63
63
|
batch = ActiveRecord::Base.connection.exec_query(
|
64
64
|
"SELECT * FROM #{tbl} LIMIT #{of} OFFSET #{offset}",
|
65
65
|
)
|
66
|
-
batch.map
|
66
|
+
batch = batch.map(&:with_indifferent_access)
|
67
67
|
augment_batch(batch)
|
68
68
|
yield batch
|
69
69
|
offset += of
|
data/lib/miscellany/version.rb
CHANGED