aws-record 2.10.0 → 2.10.1

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +330 -0
  3. data/LICENSE +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-record/record/attribute.rb +5 -15
  6. data/lib/aws-record/record/attributes.rb +32 -29
  7. data/lib/aws-record/record/batch_write.rb +1 -12
  8. data/lib/aws-record/record/buildable_search.rb +4 -2
  9. data/lib/aws-record/record/client_configuration.rb +1 -12
  10. data/lib/aws-record/record/dirty_tracking.rb +1 -12
  11. data/lib/aws-record/record/errors.rb +1 -12
  12. data/lib/aws-record/record/item_collection.rb +1 -12
  13. data/lib/aws-record/record/item_data.rb +1 -12
  14. data/lib/aws-record/record/item_operations.rb +9 -0
  15. data/lib/aws-record/record/key_attributes.rb +1 -12
  16. data/lib/aws-record/record/marshalers/boolean_marshaler.rb +1 -12
  17. data/lib/aws-record/record/marshalers/date_marshaler.rb +1 -12
  18. data/lib/aws-record/record/marshalers/date_time_marshaler.rb +1 -12
  19. data/lib/aws-record/record/marshalers/epoch_time_marshaler.rb +1 -12
  20. data/lib/aws-record/record/marshalers/float_marshaler.rb +1 -12
  21. data/lib/aws-record/record/marshalers/integer_marshaler.rb +1 -12
  22. data/lib/aws-record/record/marshalers/list_marshaler.rb +1 -12
  23. data/lib/aws-record/record/marshalers/map_marshaler.rb +1 -12
  24. data/lib/aws-record/record/marshalers/numeric_set_marshaler.rb +1 -12
  25. data/lib/aws-record/record/marshalers/string_marshaler.rb +1 -12
  26. data/lib/aws-record/record/marshalers/string_set_marshaler.rb +1 -12
  27. data/lib/aws-record/record/marshalers/time_marshaler.rb +1 -12
  28. data/lib/aws-record/record/model_attributes.rb +1 -12
  29. data/lib/aws-record/record/query.rb +1 -12
  30. data/lib/aws-record/record/secondary_indexes.rb +1 -12
  31. data/lib/aws-record/record/table_config.rb +1 -12
  32. data/lib/aws-record/record/table_migration.rb +1 -12
  33. data/lib/aws-record/record/transactions.rb +39 -7
  34. data/lib/aws-record/record/version.rb +2 -13
  35. data/lib/aws-record/record.rb +1 -12
  36. metadata +5 -2
@@ -1,15 +1,4 @@
1
- # Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not
4
- # use this file except in compliance with the License. A copy of the License is
5
- # located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is distributed on
10
- # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
- # or implied. See the License for the specific language governing permissions
12
- # and limitations under the License.
1
+ # frozen_string_literal: true
13
2
 
14
3
  module Aws
15
4
  module Record
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module Record
3
5
  module Transactions
@@ -26,15 +28,26 @@ module Aws
26
28
  # ) # => results.responses contains nil or marshalled items
27
29
  # results.responses.map { |r| r.class } # [TableOne, TableTwo, TableTwo]
28
30
  #
29
- # Provides a way to run a transactional find across multiple DynamoDB
31
+ # Provides support for the
32
+ # {https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#transact_get_items-instance_method
33
+ # Aws::DynamoDB::Client#transact_get_item} for aws-record models.
34
+ #
35
+ # This method runs a transactional find across multiple DynamoDB
30
36
  # items, including transactions which get items across multiple actual
31
- # or virtual tables.
37
+ # or virtual tables. This call can contain up to 100 item keys.
38
+ #
39
+ # DynamoDB will reject the request if any of the following is true:
40
+ # * A conflicting operation is in the process of updating an item to be read.
41
+ # * There is insufficient provisioned capacity for the transaction to be completed.
42
+ # * There is a user error, such as an invalid data format.
43
+ # * The aggregate size of the items in the transaction cannot exceed 4 MB.
32
44
  #
33
45
  # @param [Hash] opts Options to pass through to
34
46
  # {https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#transact_get_items-instance_method Aws::DynamoDB::Client#transact_get_items},
35
- # with the exception of the :transact_items array, which uses the
36
- # +#tfind_opts+ operation on your model class to provide extra
37
- # metadata used to marshal your items after retrieval.
47
+ # with the exception of the +:transact_items+ array, which uses the
48
+ # {ItemOperations.ItemOperationsClassMethods.tfind_opts #tfind_opts} operation
49
+ # on your model class to provide extra metadata used to marshal your items
50
+ # after retrieval.
38
51
  # @option opts [Array] :transact_items A set of +#tfind_opts+ results,
39
52
  # such as those created by the usage example.
40
53
  # @option opts [Aws::DynamoDB::Client] :client Optionally, you can pass
@@ -137,7 +150,11 @@ module Aws
137
150
  # ]
138
151
  # )
139
152
  #
140
- # Provides a way to pass in aws-record items into transactional writes,
153
+ # Provides support for the
154
+ # {https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#transact_write_items-instance_method
155
+ # Aws::DynamoDB::Client#transact_write_items} for aws-record models.
156
+ #
157
+ # This method passes in aws-record items into transactional writes,
141
158
  # as well as adding the ability to run 'save' commands in a transaction
142
159
  # while allowing aws-record to determine if a :put or :update operation
143
160
  # is most appropriate. +#transact_write+ supports 5 different transact
@@ -145,7 +162,7 @@ module Aws
145
162
  # - save: Behaves much like the +#save+ operation on the item itself.
146
163
  # If the keys are dirty, and thus it appears to be a new item, will
147
164
  # create a :put operation with a conditional check on the item's
148
- # existance. Note that you cannot bring your own conditional
165
+ # existence. Note that you cannot bring your own conditional
149
166
  # expression in this case. If you wish to force put or add your
150
167
  # own conditional checks, use the :put operation.
151
168
  # - put: Does a force put for the given item key and model.
@@ -153,6 +170,21 @@ module Aws
153
170
  # - delete: Deletes the given item.
154
171
  # - check: Takes the result of +#transact_check_expression+,
155
172
  # performing the specified check as a part of the transaction.
173
+ # See {ItemOperations.ItemOperationsClassMethods.transact_check_expression #transact_check_expression}
174
+ # for more information.
175
+ #
176
+ # This call contain up to 100 action requests.
177
+ #
178
+ # DynamoDB will reject the request if any of the following is true:
179
+ # * A condition in one of the condition expressions is not met.
180
+ # * An ongoing operation is in the process of updating the same item.
181
+ # * There is insufficient provisioned capacity for the transaction to
182
+ # be completed.
183
+ # * An item size becomes too large (bigger than 400 KB), a local secondary
184
+ # index (LSI) becomes too large, or a similar validation error occurs
185
+ # because of changes made by the transaction.
186
+ # * The aggregate size of the items in the transaction exceeds 4 MB.
187
+ # * There is a user error, such as an invalid data format.
156
188
  #
157
189
  # @param [Hash] opts Options to pass through to
158
190
  # {https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#transact_write_items-instance_method Aws::DynamoDB::Client#transact_write_items}
@@ -1,18 +1,7 @@
1
- # Copyright 2015-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not
4
- # use this file except in compliance with the License. A copy of the License is
5
- # located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is distributed on
10
- # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
- # or implied. See the License for the specific language governing permissions
12
- # and limitations under the License.
1
+ # frozen_string_literal: true
13
2
 
14
3
  module Aws
15
4
  module Record
16
- VERSION = '2.7.0'
5
+ VERSION = File.read(File.expand_path('../../../../VERSION', __FILE__)).strip
17
6
  end
18
7
  end
@@ -1,15 +1,4 @@
1
- # Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not
4
- # use this file except in compliance with the License. A copy of the License is
5
- # located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is distributed on
10
- # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
- # or implied. See the License for the specific language governing permissions
12
- # and limitations under the License.
1
+ # frozen_string_literal: true
13
2
 
14
3
  module Aws
15
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-13 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -32,6 +32,9 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - CHANGELOG.md
36
+ - LICENSE
37
+ - VERSION
35
38
  - lib/aws-record.rb
36
39
  - lib/aws-record/record.rb
37
40
  - lib/aws-record/record/attribute.rb