activerecord_batch_update 1.0.1 → 1.0.2
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/activerecord_batch_update.rb +2 -2
- 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: b3f85cc5ddbe603c8428d47fbf17bd24b2d60e59a6280074223755be9b196a67
|
4
|
+
data.tar.gz: 22371c42e0eb4e253fa3432ebe121ca7dfaea90f7e320ae7e86f4589a9ca9ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef6d647a559c238044721f30ec472c981199dac5082b1f621533eb9b7de359ba27c13cf6281910e947a9f44f3cbbf7349571b76098d5b3d2e3af449baef58e5
|
7
|
+
data.tar.gz: 59cbb208b8f251d71123fb60b46c6de9e83f03ce3663868456dcbacea64133210e2d77115953623dd076d6b277cdbaffe4f28487125c8b5ed64c741228f8feea
|
@@ -14,7 +14,7 @@ module ActiveRecordBatchUpdate
|
|
14
14
|
# which will re-insert the objects if they were deleted in another thread
|
15
15
|
|
16
16
|
module ClassMethods
|
17
|
-
def batch_update(entries, columns:, batch_size: 100, validate: true)
|
17
|
+
def batch_update(entries, columns:, batch_size: 100, validate: true, clear_attribute_changes: true)
|
18
18
|
columns = column_names if columns == :all
|
19
19
|
columns = (Array.wrap(columns).map(&:to_s) + %w[updated_at]).uniq
|
20
20
|
|
@@ -35,7 +35,7 @@ module ActiveRecordBatchUpdate
|
|
35
35
|
end
|
36
36
|
|
37
37
|
connection.clear_query_cache if connection.query_cache_enabled
|
38
|
-
entries.each { _1.clear_attribute_changes(columns) }
|
38
|
+
entries.each { _1.clear_attribute_changes(columns) } if clear_attribute_changes
|
39
39
|
|
40
40
|
updated_count
|
41
41
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_batch_update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quentin de Metz
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-05 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activerecord
|