activerecord_bulkoperation 0.0.2 → 0.0.3
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 16b6f4dcc796822bf9f70be61cee8aef893a8d5b
|
4
|
+
data.tar.gz: 630df700c5c08a83135f2a09259fd72727f67ad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd8cfc6f348ad5ef658a7fd9c776c88d8601cd9ad1833e50b82058ccbb41b68759f866dd1c14905714b3dbecebeacbccd0c1da354afcfbbbb0a6b39478a7a68d
|
7
|
+
data.tar.gz: f99d1aba3e113a7100c502176322af7a8899060628024976c9fc9f1733cb72b38064a851dbe9a19d06bf03211394094161e417485bed5e826c53ddac368f713d
|
@@ -11,23 +11,31 @@ module ActiveRecord
|
|
11
11
|
alias_method :create_savepoint_without_callback, :create_savepoint
|
12
12
|
|
13
13
|
def commit_db_transaction
|
14
|
-
|
14
|
+
# AKu a copy of the listener array is required, because the listener can remove can modify the array
|
15
|
+
connection_listeners.select{|l| l.respond_to?('before_commit') }.each{|l| l.before_commit}
|
16
|
+
|
15
17
|
commit_db_transaction_without_callback
|
16
|
-
|
18
|
+
|
19
|
+
# AKu a copy of the listener array is required, because the listener can remove can modify the array
|
20
|
+
connection_listeners.select{|l| l.respond_to?('after_commit') }.each{|l| l.after_commit}
|
21
|
+
|
17
22
|
end
|
18
23
|
|
19
24
|
def rollback_db_transaction
|
20
25
|
rollback_db_transaction_without_callback
|
21
|
-
|
26
|
+
# AKu a copy of the listener array is required, because the listener can remove can modify the array
|
27
|
+
connection_listeners.select{|l| l.respond_to?('after_rollback') }.each{|l| l.after_rollback}
|
22
28
|
end
|
23
29
|
|
24
30
|
def rollback_to_savepoint(name = current_savepoint_name)
|
25
31
|
rollback_to_savepoint_without_callback(name)
|
26
|
-
|
32
|
+
# AKu a copy of the listener array is required, because the listener can remove can modify the array
|
33
|
+
connection_listeners.select{|l| l.respond_to?('after_rollback_to_savepoint') }.each{|l| l.after_rollback_to_savepoint}
|
27
34
|
end
|
28
35
|
|
29
36
|
def create_savepoint(name = current_savepoint_name)
|
30
|
-
|
37
|
+
# AKu a copy of the listener array is required, because the listener can remove can modify the array
|
38
|
+
connection_listeners.select{|l| l.respond_to?('before_create_savepoint') }.each{|l| l.before_create_savepoint}
|
31
39
|
create_savepoint_without_callback(name)
|
32
40
|
end
|
33
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_bulkoperation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OSP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.6.1
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: ''
|