aws-record 2.9.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 (39) 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.rb +99 -35
  8. data/lib/aws-record/record/batch_read.rb +186 -0
  9. data/lib/aws-record/record/batch_write.rb +9 -14
  10. data/lib/aws-record/record/buildable_search.rb +4 -2
  11. data/lib/aws-record/record/client_configuration.rb +1 -12
  12. data/lib/aws-record/record/dirty_tracking.rb +1 -12
  13. data/lib/aws-record/record/errors.rb +1 -12
  14. data/lib/aws-record/record/item_collection.rb +2 -13
  15. data/lib/aws-record/record/item_data.rb +1 -12
  16. data/lib/aws-record/record/item_operations.rb +47 -12
  17. data/lib/aws-record/record/key_attributes.rb +1 -12
  18. data/lib/aws-record/record/marshalers/boolean_marshaler.rb +1 -12
  19. data/lib/aws-record/record/marshalers/date_marshaler.rb +1 -12
  20. data/lib/aws-record/record/marshalers/date_time_marshaler.rb +1 -12
  21. data/lib/aws-record/record/marshalers/epoch_time_marshaler.rb +1 -12
  22. data/lib/aws-record/record/marshalers/float_marshaler.rb +1 -12
  23. data/lib/aws-record/record/marshalers/integer_marshaler.rb +1 -12
  24. data/lib/aws-record/record/marshalers/list_marshaler.rb +1 -12
  25. data/lib/aws-record/record/marshalers/map_marshaler.rb +1 -12
  26. data/lib/aws-record/record/marshalers/numeric_set_marshaler.rb +1 -12
  27. data/lib/aws-record/record/marshalers/string_marshaler.rb +1 -12
  28. data/lib/aws-record/record/marshalers/string_set_marshaler.rb +1 -12
  29. data/lib/aws-record/record/marshalers/time_marshaler.rb +1 -12
  30. data/lib/aws-record/record/model_attributes.rb +1 -12
  31. data/lib/aws-record/record/query.rb +1 -12
  32. data/lib/aws-record/record/secondary_indexes.rb +1 -12
  33. data/lib/aws-record/record/table_config.rb +1 -12
  34. data/lib/aws-record/record/table_migration.rb +1 -12
  35. data/lib/aws-record/record/transactions.rb +39 -7
  36. data/lib/aws-record/record/version.rb +2 -13
  37. data/lib/aws-record/record.rb +1 -12
  38. data/lib/aws-record.rb +2 -12
  39. metadata +7 -3
@@ -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
@@ -54,7 +43,7 @@ module Aws
54
43
  # match your search.
55
44
  #
56
45
  # @return [Array<Aws::Record>] an array of the record items found in the
57
- # first page of reponses from the query or scan call.
46
+ # first page of responses from the query or scan call.
58
47
  def page
59
48
  search_response = items
60
49
  @last_evaluated_key = search_response.last_evaluated_key
@@ -1,15 +1,4 @@
1
- # Copyright 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,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
@@ -354,6 +343,8 @@ module Aws
354
343
  # Allows you to build a "check" expression for use in transactional
355
344
  # write operations.
356
345
  #
346
+ # See {Transactions.transact_write transact_write} for more info.
347
+ #
357
348
  # @param [Hash] opts Options matching the :condition_check contents in
358
349
  # the
359
350
  # {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}
@@ -381,6 +372,13 @@ module Aws
381
372
  opts
382
373
  end
383
374
 
375
+ # Used in {Transactions.transact_find}, which is a way to run
376
+ # transactional find across multiple DynamoDB items, including transactions
377
+ # which get items across multiple actual or virtual tables.
378
+ #
379
+ # This operation provide extra metadata used to marshal your items after retrieval.
380
+ #
381
+ # See {Transactions.transact_find transact_find} for more info and usage example.
384
382
  def tfind_opts(opts)
385
383
  opts = opts.dup
386
384
  key = opts.delete(:key)
@@ -514,6 +512,43 @@ module Aws
514
512
  end
515
513
  end
516
514
 
515
+
516
+ # @example Usage Example
517
+ # class MyModel
518
+ # include Aws::Record
519
+ # integer_attr :id, hash_key: true
520
+ # string_attr :name, range_key: true
521
+ # end
522
+ #
523
+ # # returns a homogenous list of items
524
+ # foo_items = MyModel.find_all(
525
+ # [
526
+ # {id: 1, name: 'n1'},
527
+ # {id: 2, name: 'n2'}
528
+ # ])
529
+ #
530
+ # Provides support for the
531
+ # {https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#batch_get_item-instance_method
532
+ # Aws::DynamoDB::Client#batch_get_item} for your model.
533
+ #
534
+ # This method will take a list of keys and return an instance of +Aws::Record::BatchRead+
535
+ #
536
+ # See {Batch.read} for more details.
537
+ # @param [Array] keys an array of item key hashes you wish to search for.
538
+ # @return [Aws::Record::BatchRead] An instance that contains modeled items
539
+ # from the +BatchGetItem+ result and stores unprocessed keys to be
540
+ # manually processed later.
541
+ # @raise [Aws::Record::Errors::KeyMissing] if your param hashes do not
542
+ # include all the keys defined in model.
543
+ # @raise [ArgumentError] if the provided keys are a duplicate.
544
+ def find_all(keys)
545
+ Aws::Record::Batch.read do |db|
546
+ keys.each do |key|
547
+ db.find(self, key)
548
+ end
549
+ end
550
+ end
551
+
517
552
  # @example Usage Example
518
553
  # class MyModel
519
554
  # include Aws::Record
@@ -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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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
  require 'date'
15
4
 
@@ -1,15 +1,4 @@
1
- # Copyright 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
  require 'date'
15
4
 
@@ -1,15 +1,4 @@
1
- # Copyright 2018 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
  require 'time'
15
4
 
@@ -1,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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,15 +1,4 @@
1
- # Copyright 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
  require 'time'
15
4
 
@@ -1,15 +1,4 @@
1
- # Copyright 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,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,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,15 +1,4 @@
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
@@ -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
 
data/lib/aws-record.rb CHANGED
@@ -1,15 +1,4 @@
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
  require 'aws-sdk-dynamodb'
15
4
  require_relative 'aws-record/record/client_configuration'
@@ -30,6 +19,7 @@ require_relative 'aws-record/record/table_migration'
30
19
  require_relative 'aws-record/record/version'
31
20
  require_relative 'aws-record/record/transactions'
32
21
  require_relative 'aws-record/record/buildable_search'
22
+ require_relative 'aws-record/record/batch_read'
33
23
  require_relative 'aws-record/record/batch_write'
34
24
  require_relative 'aws-record/record/batch'
35
25
  require_relative 'aws-record/record/marshalers/string_marshaler'
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.9.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: 2022-11-16 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,11 +32,15 @@ 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
38
41
  - lib/aws-record/record/attributes.rb
39
42
  - lib/aws-record/record/batch.rb
43
+ - lib/aws-record/record/batch_read.rb
40
44
  - lib/aws-record/record/batch_write.rb
41
45
  - lib/aws-record/record/buildable_search.rb
42
46
  - lib/aws-record/record/client_configuration.rb
@@ -65,7 +69,7 @@ files:
65
69
  - lib/aws-record/record/table_migration.rb
66
70
  - lib/aws-record/record/transactions.rb
67
71
  - lib/aws-record/record/version.rb
68
- homepage: http://github.com/aws/aws-sdk-ruby-record
72
+ homepage: https://github.com/aws/aws-sdk-ruby-record
69
73
  licenses:
70
74
  - Apache 2.0
71
75
  metadata: {}