activegraph 12.0.0.beta.6 → 12.0.0.beta.7
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/CHANGELOG.md +5 -0
- data/lib/active_graph/transaction.rb +5 -1
- data/lib/active_graph/transactions.rb +12 -9
- data/lib/active_graph/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: 855f60d7bca8cec018819f65c0765be6002683af5617b3ec2e81b8c0cc5559e0
|
|
4
|
+
data.tar.gz: 06261c803fc0c5ed98d7b32b4bb621f7d2a239b8519c7f23e9c2c84458018271
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d815973f66662ea91c56b12c0bde8cc5ae17ce5df727c19f735397cce96e4b4549dcda7a1c84fd26dfe645b4ac0602a303a1cd4e2e2aecb33801d7d8d462e4fb
|
|
7
|
+
data.tar.gz: 9e3bf57529430fad4cfb4332bc48f497bf19f17ade7dae94f1047e9a26d953a74b04f157223b1a382a0f07b7422b4f018e47a1bdd60d6dc964f607060e2636d3
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
This file should follow the standards specified on [http://keepachangelog.com/]
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [12.0.0.beta.7] (2026-03-19)
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- Improved rollback handling in nested transactions to ensure the result of the block is returned even when a rollback is triggered.
|
|
10
|
+
|
|
6
11
|
## [12.0.0.beta.6] 2026-03-18
|
|
7
12
|
|
|
8
13
|
## Added
|
|
@@ -42,24 +42,27 @@ module ActiveGraph
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
def run_transaction_work(session, method, **config, &block)
|
|
46
|
-
|
|
45
|
+
def run_transaction_work(session, method, implicit: false, **config, &block)
|
|
46
|
+
result = nil
|
|
47
47
|
session.send(method, **config) do |tx|
|
|
48
48
|
self.tx = tx
|
|
49
|
-
block.call(tx).tap do
|
|
50
|
-
if implicit
|
|
51
|
-
|
|
52
|
-
.any?(&result.method(:is_a?))
|
|
53
|
-
result.store
|
|
54
|
-
end
|
|
49
|
+
(result = block.call(tx)).tap do
|
|
50
|
+
store(it) if implicit
|
|
51
|
+
tx.check_rollback
|
|
55
52
|
end
|
|
56
53
|
end.tap { tx.apply_callbacks }
|
|
57
54
|
rescue ActiveGraph::Rollback
|
|
58
55
|
# rollbacks are silently swallowed
|
|
59
|
-
|
|
56
|
+
result
|
|
60
57
|
ensure
|
|
61
58
|
self.tx = nil
|
|
62
59
|
end
|
|
60
|
+
|
|
61
|
+
def store(result)
|
|
62
|
+
if [Core::Result, ActiveGraph::Node::Query::QueryProxy, ActiveGraph::Core::Query].any?(&result.method(:is_a?))
|
|
63
|
+
result.store
|
|
64
|
+
end
|
|
65
|
+
end
|
|
63
66
|
end
|
|
64
67
|
end
|
|
65
68
|
end
|
data/lib/active_graph/version.rb
CHANGED