foobara 0.0.117 → 0.0.118
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/projects/command/src/command_pattern_implementation/concerns/errors.rb +3 -1
- data/projects/entity/src/concerns/queries.rb +7 -1
- data/projects/entity/src/extensions/builtin_types/entity/validators/model_instance_is_valid.rb +1 -1
- data/projects/persistence/src/entity_base/transaction_table/concerns/queries.rb +16 -4
- data/projects/persistence/src/entity_base/transaction_table.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: d533ff82e3a7cfc662c86200e72348deba90893cf323bcb659d15ad0bceaeb63
|
4
|
+
data.tar.gz: d0dd96e29ac80ffefcb0c815e84d740e783485f41f9dbec60036fbac4d6e2dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a52322e2a4c15b64c334b4dc6e25dc77be9424628f314c453398fb98de114e96c596c1812250f607e408764342bed0a9062f250d1674328c44b00f4cc72eb7d4
|
7
|
+
data.tar.gz: f193c28f3db9a9a484661d51b33626ebcaeaa6e1621e07b978f21986fcbf91c8ecd5e21b5fdb7984362a80e0449c9f7292f4c7684331321eb4bb6c0a03ff599b
|
@@ -45,7 +45,13 @@ module Foobara
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def load(record)
|
48
|
-
if
|
48
|
+
if record.is_a?(Foobara::Entity)
|
49
|
+
if record.loaded?
|
50
|
+
record
|
51
|
+
else
|
52
|
+
current_transaction_table.load(record)
|
53
|
+
end
|
54
|
+
else
|
49
55
|
current_transaction_table.load(record)
|
50
56
|
end
|
51
57
|
rescue ::Foobara::Persistence::EntityAttributesCrudDriver::Table::CannotFindError
|
@@ -9,12 +9,10 @@ module Foobara
|
|
9
9
|
def all(&)
|
10
10
|
enumerator = Enumerator.new do |yielder|
|
11
11
|
tracked_records.each do |record|
|
12
|
-
next if record.hard_deleted?
|
13
|
-
|
14
12
|
# if the record is not loaded, it could be an unloaded thunk with a primary key to a row that has
|
15
13
|
# been deleted or maybe never even existed. So just exclude those and let them come from the
|
16
14
|
# database in the next loop
|
17
|
-
if created?(record) || record.loaded?
|
15
|
+
if !record.hard_deleted? && (created?(record) || record.loaded?)
|
18
16
|
yielder << record
|
19
17
|
end
|
20
18
|
end
|
@@ -22,7 +20,21 @@ module Foobara
|
|
22
20
|
entity_attributes_crud_driver_table.all.each do |attributes|
|
23
21
|
attributes = normalize_attributes(attributes)
|
24
22
|
primary_key = primary_key_for_attributes(attributes)
|
25
|
-
|
23
|
+
|
24
|
+
if tracked_records.include_key?(primary_key)
|
25
|
+
record = tracked_records.find_by_key(primary_key)
|
26
|
+
|
27
|
+
next if record.hard_deleted?
|
28
|
+
next if created?(record)
|
29
|
+
|
30
|
+
unless record.loaded?
|
31
|
+
load(record)
|
32
|
+
yielder << record
|
33
|
+
next
|
34
|
+
end
|
35
|
+
|
36
|
+
next
|
37
|
+
end
|
26
38
|
|
27
39
|
yielder << entity_class.loaded(attributes)
|
28
40
|
end
|
@@ -255,7 +255,7 @@ module Foobara
|
|
255
255
|
element_types = entity_class.attributes_type.element_types
|
256
256
|
|
257
257
|
attributes_filter = attributes_filter.to_h do |attribute_name, value|
|
258
|
-
[attribute_name,
|
258
|
+
[attribute_name, element_types[attribute_name].process_value!(value)]
|
259
259
|
end
|
260
260
|
|
261
261
|
tracked_records.each do |record|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.118
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-07 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|