dynamoid 3.13.1 → 3.14.0
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 +34 -5
- data/README.md +60 -1584
- data/lib/dynamoid/associations/association.rb +10 -2
- data/lib/dynamoid/associations/belongs_to.rb +3 -1
- data/lib/dynamoid/associations/has_and_belongs_to_many.rb +0 -1
- data/lib/dynamoid/associations/has_many.rb +0 -1
- data/lib/dynamoid/associations/has_one.rb +1 -2
- data/lib/dynamoid/associations/many_association.rb +1 -0
- data/lib/dynamoid/associations.rb +64 -48
- data/lib/dynamoid/components.rb +1 -0
- data/lib/dynamoid/criteria/chain.rb +43 -30
- data/lib/dynamoid/dirty.rb +3 -2
- data/lib/dynamoid/document.rb +29 -21
- data/lib/dynamoid/fields.rb +55 -41
- data/lib/dynamoid/finders.rb +1 -1
- data/lib/dynamoid/indexes.rb +29 -21
- data/lib/dynamoid/persistence/inc.rb +15 -7
- data/lib/dynamoid/persistence/save.rb +21 -14
- data/lib/dynamoid/persistence.rb +88 -54
- data/lib/dynamoid/transactions/mutation/base.rb +76 -0
- data/lib/dynamoid/transactions/mutation/builders/delete_request_builder.rb +44 -0
- data/lib/dynamoid/transactions/mutation/builders/update_request_builder.rb +139 -0
- data/lib/dynamoid/transactions/mutation/create.rb +52 -0
- data/lib/dynamoid/transactions/mutation/delete_with_instance.rb +80 -0
- data/lib/dynamoid/transactions/mutation/delete_with_primary_key.rb +62 -0
- data/lib/dynamoid/transactions/mutation/destroy.rb +96 -0
- data/lib/dynamoid/transactions/mutation/import.rb +84 -0
- data/lib/dynamoid/transactions/mutation/inc.rb +101 -0
- data/lib/dynamoid/transactions/mutation/increment.rb +63 -0
- data/lib/dynamoid/transactions/mutation/save.rb +194 -0
- data/lib/dynamoid/transactions/mutation/touch.rb +99 -0
- data/lib/dynamoid/transactions/mutation/update_attributes.rb +49 -0
- data/lib/dynamoid/transactions/mutation/update_fields.rb +185 -0
- data/lib/dynamoid/transactions/mutation/upsert.rb +94 -0
- data/lib/dynamoid/transactions/mutation.rb +935 -0
- data/lib/dynamoid/transactions/retrieval/find.rb +140 -0
- data/lib/dynamoid/transactions/retrieval.rb +150 -0
- data/lib/dynamoid/transactions.rb +63 -0
- data/lib/dynamoid/version.rb +1 -1
- data/lib/dynamoid.rb +1 -2
- metadata +23 -17
- data/lib/dynamoid/transaction_read/find.rb +0 -137
- data/lib/dynamoid/transaction_read.rb +0 -146
- data/lib/dynamoid/transaction_write/base.rb +0 -59
- data/lib/dynamoid/transaction_write/create.rb +0 -49
- data/lib/dynamoid/transaction_write/delete_with_instance.rb +0 -65
- data/lib/dynamoid/transaction_write/delete_with_primary_key.rb +0 -64
- data/lib/dynamoid/transaction_write/destroy.rb +0 -84
- data/lib/dynamoid/transaction_write/item_updater.rb +0 -60
- data/lib/dynamoid/transaction_write/save.rb +0 -177
- data/lib/dynamoid/transaction_write/update_attributes.rb +0 -46
- data/lib/dynamoid/transaction_write/update_fields.rb +0 -247
- data/lib/dynamoid/transaction_write/upsert.rb +0 -113
- data/lib/dynamoid/transaction_write.rb +0 -673
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da9e734377895a7f4bdf90218757bf03f6d7ffeb18661a858dcfab5977065d0c
|
|
4
|
+
data.tar.gz: e7276b6f31cd7a7999c679cf1d5b96b4c25278949bebd09dcd88e4dd64e38c3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4b5fa9bd1573d3443397661ab7b6bff21d1f50fa7b665ca19022d928e270652539558af53f4fcd56dc53db8181e2a59439a05981726cbaf4bf5d05f4bf440ef
|
|
7
|
+
data.tar.gz: b609e4cdf51b3057d022159e0d080a456df2dc40806cfbf22ec35fadb56f7547b9eada4c5cbfb339fcd4d2a2555019379811ec55b521fc922c576fb79a2a0137
|
data/CHANGELOG.md
CHANGED
|
@@ -11,13 +11,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
### Changed
|
|
12
12
|
### Removed
|
|
13
13
|
|
|
14
|
-
## 3.
|
|
14
|
+
## 3.14.0 / 2026-07-26
|
|
15
15
|
|
|
16
16
|
### Fixed
|
|
17
|
-
* [#
|
|
17
|
+
* [#1006](https://github.com/Dynamoid/dynamoid/pull/1006) Fix non-transactional modifying methods to:
|
|
18
|
+
* preserve explicitly specified `lock_version` values
|
|
19
|
+
* preserve an already persisted `nil` value of `lock_version` during model persistence
|
|
20
|
+
* skip locking when `lock_version` is `nil`
|
|
21
|
+
* [#1007](https://github.com/Dynamoid/dynamoid/pull/1007) Fix transactional `#update_fields` and `#save` methods to support DynamoDB reserved words as partition and sort key names
|
|
22
|
+
* [#1007](https://github.com/Dynamoid/dynamoid/pull/1007) Fix non-transactional `#inc` method to
|
|
23
|
+
* raise `UnknownAttribute` when passed an unknown field name
|
|
24
|
+
* raise `MissingHashKey` or `MissingRangeKey` when the partition or sort key is `nil` or omitted
|
|
25
|
+
* [#1007](https://github.com/Dynamoid/dynamoid/pull/1007) Fix transactional `#delete`, `#update_fields`, and `#upsert` methods to type-cast partition and sort key values
|
|
26
|
+
* [#1010](https://github.com/Dynamoid/dynamoid/pull/1010) Fix transactional `#delete(model)` to run `after_commit` and `after_rollback` callbacks
|
|
18
27
|
### Added
|
|
28
|
+
* [#1005](https://github.com/Dynamoid/dynamoid/pull/1005) Introduce public methods to start transactions (replace the removed `Dynamoid::TransactionRead` class):
|
|
29
|
+
* `Dynamoid::Document.transaction`
|
|
30
|
+
* `Dynamoid::Document.transaction.writing`
|
|
31
|
+
* `Dynamoid::Document.transaction.reading`
|
|
32
|
+
* [#1007](https://github.com/Dynamoid/dynamoid/pull/1007) Add transactional `#inc` method
|
|
33
|
+
* [#1010](https://github.com/Dynamoid/dynamoid/pull/1010) Add missing transactional methods:
|
|
34
|
+
* `#increment!`, `#decrement!`
|
|
35
|
+
* `#touch`
|
|
36
|
+
* `#update_attribute`, `#update_attribute!`
|
|
37
|
+
* `#import`
|
|
19
38
|
### Changed
|
|
39
|
+
* [#1006](https://github.com/Dynamoid/dynamoid/pull/1006) Implement optimistic locking for transactional methods using the `lock_version` field. The following methods now support it:
|
|
40
|
+
* `#save`, `#save!`
|
|
41
|
+
* `#create`, `#create!`
|
|
42
|
+
* `#update_attributes`, `#update_attributes!`
|
|
43
|
+
* `#update_attribute`
|
|
44
|
+
* `#delete`
|
|
45
|
+
* `#destroy`, `#destroy!`
|
|
20
46
|
### Removed
|
|
47
|
+
* [#1005](https://github.com/Dynamoid/dynamoid/pull/1005) Remove the `Dynamoid::TransactionRead` class (which was part of the experimental API)
|
|
48
|
+
|
|
49
|
+
## 3.13.1 / 2026-05-05
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
* [#1003](https://github.com/Dynamoid/dynamoid/pull/1003) Fix detecting dirty changes for `:map` fields
|
|
21
53
|
|
|
22
54
|
## 3.13.0 / 2026-03-29
|
|
23
55
|
|
|
@@ -30,8 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
62
|
* [#945](https://github.com/Dynamoid/dynamoid/pull/945) Implement `#update_attribute!` method
|
|
31
63
|
* [#947](https://github.com/Dynamoid/dynamoid/pull/947) Allow skipping default model fields generation and add option `:skip_generating_fields` for the `table` method to specify field names
|
|
32
64
|
* [#988](https://github.com/Dynamoid/dynamoid/pull/988) Add Ruby 4.0 and Rails 8.1 in CI
|
|
33
|
-
### Changed
|
|
34
|
-
### Removed
|
|
35
65
|
|
|
36
66
|
## 3.12.0 / 2025-08-23
|
|
37
67
|
|
|
@@ -54,7 +84,6 @@ A proper behaviour is to use adapter's .dynamoid_dump method instead of a value'
|
|
|
54
84
|
* [#926](https://github.com/Dynamoid/dynamoid/pull/926) Implemented read transactions (using DynamoDB's `TransactGetItems` operation)
|
|
55
85
|
### Changed
|
|
56
86
|
* [#846](https://github.com/Dynamoid/dynamoid/pull/846) Changed transactional `update_fields()` method to accept a block and support low-level operations `set`, `add`, `delete`, `remove` (similar to the non-transactional `#update()` method) (@ckhsponge)
|
|
57
|
-
### Removed
|
|
58
87
|
|
|
59
88
|
## 3.11.0 / 2025-01-12
|
|
60
89
|
### Fixed
|