dynamoid 3.7.1 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc5c35cc32f9e77598030b980baff43156095b9480be6984d67e2cb5116fae47
4
- data.tar.gz: 7b8ff766d64bf83096bf641f7ca641ab15974f451481a215cf63b69597cf4126
3
+ metadata.gz: 6e1643f808e93716814d86080198b41cdf26991d9e75614f7d877561590b23d9
4
+ data.tar.gz: 453bb6e2c52d73cc94db42ba550fc621524ecba4cc4703445a00977d013b5c9a
5
5
  SHA512:
6
- metadata.gz: 0f4ac62013723a6880583471808d823cdbd4b84944357249a4dbad7b4087cf32bffc53880ec599c2f5fd61b07136ce7f7be05677fdc0aedf80ae3cf3c2b7b0ee
7
- data.tar.gz: 3da0f1ffa1225c5233032330d6d1b9c5e2da60979770b42faecbd8141fd8bd5b9520767c2cc01beb5cee8a7979996cdaa53c3a03c49815c3b01dd23c8dabbb37
6
+ metadata.gz: 3cc09e208f6d1be1bf953efda001cb006fa8a752830e192a418ba449807163761427dd443fac32ee3cb34cf690e613c3ff1e34a3cf0515d50f609319b71c69e7
7
+ data.tar.gz: 8ded4ae6a694788719dfc152adb6890f5cd18ff38acf99e422b824ed28c2d010e54caf05016af230d3cb49e5900618ced303148ebbc6ea5dce391dc838c278b2
data/CHANGELOG.md CHANGED
@@ -1,111 +1,115 @@
1
- # HEAD
2
-
3
- ---
4
-
5
-
6
-
7
- # 3.7.1 / 2021-06-30
8
-
9
- ## Fixes
10
-
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+ ### Fixed
9
+
10
+ ### Added
11
+
12
+ ### Changed
13
+
14
+ ### Removed
15
+
16
+ ## 3.8.0
17
+ ### Fixed
18
+ * [#525](https://github.com/Dynamoid/dynamoid/pull/525) Don't mark an attribute as changed if new assigned value equals the old one (@a5-stable)
19
+ * Minor changes in the documentation:
20
+ * [#526](https://github.com/Dynamoid/dynamoid/pull/526) (@a5-stable)
21
+ * [#528](https://github.com/Dynamoid/dynamoid/pull/528) (@a5-stable)
22
+ * [#589](https://github.com/Dynamoid/dynamoid/pull/589) (@jrhoads)
23
+ * [#527](https://github.com/Dynamoid/dynamoid/pull/527) Fix `update_fields` and `upsert` methods - take into account the table-specific `timestamps` option for setting the `updated_at` attribute
24
+ (@oieioi)
25
+ * [#533](https://github.com/Dynamoid/dynamoid/pull/533) Allow attribute with custom type to be used as a partition or sort key of DynamoDB index (@rahul342)
26
+ * [#558](https://github.com/Dynamoid/dynamoid/pull/558) Change the way how a filename is derived from a model class name in a warning about using the Scan operation (@a5-stable)
27
+ * [#567](https://github.com/Dynamoid/dynamoid/pull/567) Fix `#reload` and mark a reloaded model as persisted
28
+ * [#573](https://github.com/Dynamoid/dynamoid/pull/573) Fix proxying of method calls with keyword arguments called on an association for Ruby 2.7 and above (@xeger)
29
+ * [#579](https://github.com/Dynamoid/dynamoid/pull/579) Fix `create_table` method when a `table_name` option passed in case a model has TTL setting enabled (@ta1kt0me)
30
+ * [#591](https://github.com/Dynamoid/dynamoid/pull/591) Multiple fixes:
31
+ * Fix `#update` and `#update!` - take into account the table-specific `timestamps` option for setting the `updated_at` attribute
32
+ * Fix `#update_attribute` - skip validation
33
+ * Return `self` in some public methods to enable methods chaining
34
+ * [#601](https://github.com/Dynamoid/dynamoid/pull/601) Fix `#first` and `#pluck` methods: do not mutate query parameters and affect other query methods.
35
+
36
+ ### Added
37
+ * [#531](https://github.com/Dynamoid/dynamoid/pull/531) Run `before_update` and `after_update` callbacks at saving a model (@a5-stable)
38
+ * [#536](https://github.com/Dynamoid/dynamoid/pull/536) Modernization
39
+ * Support for Ruby 3.1
40
+ * Support for Rails 7.0
41
+ * Keep a Changelog Format
42
+
43
+ ## 3.7.1 / 2021-06-30
44
+ ### Fixed
11
45
  * [#484](https://github.com/Dynamoid/dynamoid/pull/484) Fix model deletion - update cached foreign keys in associated models when delete a model
12
46
  * [#492](https://github.com/Dynamoid/dynamoid/pull/492) Fix using `:date` field as an index hash/range key (@yoshida-eth0)
13
47
  * [#503](https://github.com/Dynamoid/dynamoid/pull/503) Fix explicit forcing index with `#with_index` method when perform Scan operation (@bmalinconico)
14
48
  * [#511](https://github.com/Dynamoid/dynamoid/pull/511) Fix `BatchGetItem` operation when partial result returned (so there are unprocessed keys) and table has a range key. The fix affects `.find_all` method only (@Bajena)
15
49
 
16
-
17
-
18
- # 3.7.0 / 2021-02-02
19
-
20
-
21
- ## Features
22
-
50
+ ## 3.7.0 / 2021-02-02
51
+ ### Added
23
52
  * [#476](https://github.com/Dynamoid/dynamoid/pull/476) Added `#with_index` method to force an index in query (@bmalinconico)
24
53
  * [#481](https://github.com/Dynamoid/dynamoid/pull/481) Added `alias` option to the `field` method to declare a field alias and use more conventional name to set and get value
25
54
 
26
- ## Improvements
27
-
55
+ ### Changed
28
56
  * [#482](https://github.com/Dynamoid/dynamoid/pull/482) Support Ruby 3.0 and Rails 6.1
29
57
  * [#461](https://github.com/Dynamoid/dynamoid/pull/461) Allow to delete item attribute with `#update` method (@jkirsteins)
30
58
  * [#463](https://github.com/Dynamoid/dynamoid/pull/463) Raise `UnknownAttribute` exception when specified not declared attribute name (@AlexGascon)
31
59
 
32
- ## Fixes
33
-
60
+ ### Fixed
34
61
  * [#480](https://github.com/Dynamoid/dynamoid/pull/480) Repair `.consistent`/`.delete_all`/`.destroy_all` calls directly on a model class
35
62
  * [#484](https://github.com/Dynamoid/dynamoid/pull/484) Fix broken foreign keys after model deleting (@kkan)
36
- * Fixes in Readme.md: [#470](https://github.com/Dynamoid/dynamoid/pull/470) (@rromanchuk), [#473](https://github.com/Dynamoid/dynamoid/pull/473) (@Rulikkk)
37
-
38
- ---
39
-
40
-
41
-
42
- # 3.6.0 / 2020-07-13
43
-
44
-
45
- ## Features
63
+ * Fixed in Readme.md: [#470](https://github.com/Dynamoid/dynamoid/pull/470) (@rromanchuk), [#473](https://github.com/Dynamoid/dynamoid/pull/473) (@Rulikkk)
46
64
 
65
+ ## 3.6.0 / 2020-07-13
66
+ ### Added
47
67
  * [#458](https://github.com/Dynamoid/dynamoid/pull/458) Added `binary` field type
48
68
  * [#459](https://github.com/Dynamoid/dynamoid/pull/459) Added `log_formatter` config option and changed default logging format
49
69
 
50
- ## Improvements
51
-
70
+ ### Changed
52
71
  * [#423](https://github.com/Dynamoid/dynamoid/pull/423) Added warning when generated for a field methods override existing ones
53
72
  * [#429](https://github.com/Dynamoid/dynamoid/pull/429) Added `raise_error` option for `find` method
54
73
  * [#440](https://github.com/Dynamoid/dynamoid/pull/440) Optimized performance of `first` method when there are only conditions on key attribute in a query (@mrkamel)
55
74
  * [#445](https://github.com/Dynamoid/dynamoid/pull/445) Support `limit` parameter in `first` method (@mrkamel)
56
- * [#450](https://github.com/Dynamoid/dynamoid/pull/450) Got rid of `null-logger` gem to make Dynamoid dependencies license suitable for commercial use (@yakjuly)
57
75
  * [#454](https://github.com/Dynamoid/dynamoid/pull/454) Added block argument to `create`/`create!` methods
58
76
  * [#456](https://github.com/Dynamoid/dynamoid/pull/456) Detect when `find` method requires a range key argument and raise `Dynamoid::Errors::MissingRangeKey` exception if it's missing
59
77
  * YARD documentation:
60
78
  * added missing documentation so now all the public methods are documented
61
79
  * hid all the private methods and classes
62
80
 
63
- ## Fixes
81
+ ### Removed
82
+ * [#450](https://github.com/Dynamoid/dynamoid/pull/450) Got rid of `null-logger` gem to make Dynamoid dependencies license suitable for commercial use (@yakjuly)
64
83
 
84
+ ### Fixed
65
85
  * [#425](https://github.com/Dynamoid/dynamoid/pull/425) Fixed typos in the README.md file (@omarsotillo)
66
86
  * [#432](https://github.com/Dynamoid/dynamoid/pull/432) Support tables that use "hash_key" as their partition key name (@remomueller)
67
87
  * [#434](https://github.com/Dynamoid/dynamoid/pull/434) Support tables that have attribute with name "range_value"
68
88
  * [#453](https://github.com/Dynamoid/dynamoid/pull/453) Fixed issue with using `type` attribute as a GSI hash key
69
89
 
70
- ---
71
-
72
-
73
-
74
- # 3.5.0 / 2020-04-04
75
-
76
-
77
- ## Features
78
- * Feature: [#405](https://github.com/Dynamoid/dynamoid/pull/405) Added `update!` class method (@UrsaDK)
79
- * Feature: [#408](https://github.com/Dynamoid/dynamoid/pull/408) Added `ActiveSupport` load hook on `Dynamoid` load (@aaronmallen)
80
- * Feature: [#422](https://github.com/Dynamoid/dynamoid/pull/422) Added `.pluck` method
81
-
82
- ## Fixes:
83
- * Fix: [#410](https://github.com/Dynamoid/dynamoid/pull/410) Fixed creating GSI when table uses on-demand capacity provisioning (@icy-arctic-fox)
84
- * Fix: [#414](https://github.com/Dynamoid/dynamoid/pull/414) Fixed lazy table creation
85
- * Fix: [#415](https://github.com/Dynamoid/dynamoid/pull/415) Fixed RubyDoc comment (@walkersumida)
86
- * Fix: [#420](https://github.com/Dynamoid/dynamoid/pull/420) Fixed `#persisted?` for deleted/destroyed models
87
-
88
- ## Improvements:
89
- * Improvement: [#416](https://github.com/Dynamoid/dynamoid/pull/416) Improved speed of Adapter's `truncate` method. It now uses `#batch_delete_item` method (@TheSmartnik)
90
- * Improvement: [#421](https://github.com/Dynamoid/dynamoid/pull/421) Added `touch: false` option of the #save method
91
- * Improvement: [#423](https://github.com/Dynamoid/dynamoid/pull/423) Added warning when generated for a field methods override existing ones
92
-
93
- ---
94
-
95
-
96
-
97
- # 3.4.1
90
+ ## 3.5.0 / 2020-04-04
91
+ ### Added
92
+ * [#405](https://github.com/Dynamoid/dynamoid/pull/405) Added `update!` class method (@UrsaDK)
93
+ * [#408](https://github.com/Dynamoid/dynamoid/pull/408) Added `ActiveSupport` load hook on `Dynamoid` load (@aaronmallen)
94
+ * [#422](https://github.com/Dynamoid/dynamoid/pull/422) Added `.pluck` method
95
+
96
+ ### Fixed
97
+ * [#410](https://github.com/Dynamoid/dynamoid/pull/410) Fixed creating GSI when table uses on-demand capacity provisioning (@icy-arctic-fox)
98
+ * [#414](https://github.com/Dynamoid/dynamoid/pull/414) Fixed lazy table creation
99
+ * [#415](https://github.com/Dynamoid/dynamoid/pull/415) Fixed RubyDoc comment (@walkersumida)
100
+ * [#420](https://github.com/Dynamoid/dynamoid/pull/420) Fixed `#persisted?` for deleted/destroyed models
101
+
102
+ ### Changed
103
+ * [#416](https://github.com/Dynamoid/dynamoid/pull/416) Improved speed of Adapter's `truncate` method. It now uses `#batch_delete_item` method (@TheSmartnik)
104
+ * [#421](https://github.com/Dynamoid/dynamoid/pull/421) Added `touch: false` option of the #save method
105
+ * [#423](https://github.com/Dynamoid/dynamoid/pull/423) Added warning when generated for a field methods override existing ones
98
106
 
99
- ## Fixes
107
+ ## 3.4.1
108
+ ### Fixed
100
109
  * Fix: [#398](https://github.com/Dynamoid/dynamoid/pull/398) Fix broken configuration
101
110
 
102
- ---
103
-
104
-
105
-
106
- # 3.4.0
107
-
108
- ## Features
111
+ ## 3.4.0
112
+ ### Added
109
113
  * Feature: [#386](https://github.com/Dynamoid/dynamoid/pull/386) Disable timestamps fields on a table level with new
110
114
  table option `timestamps`
111
115
  * Feature: [#387](https://github.com/Dynamoid/dynamoid/pull/387) Add TTL support with table option `expires`
@@ -113,137 +117,102 @@
113
117
  option `credentials` (@emmajhyde)
114
118
  * Feature: [#397](https://github.com/Dynamoid/dynamoid/pull/397) Configure on-demand table capacity mode with `capacity_mode` option
115
119
 
116
- ## Improvements
120
+ ### Changed
117
121
  * Improvement: [#388](https://github.com/Dynamoid/dynamoid/pull/388) Minor memory optimization - don't allocate excessive
118
122
  hash (@arjes)
119
123
 
120
- ## Fixes
121
-
124
+ ### Fixed
122
125
  * Fix: [#382](https://github.com/Dynamoid/dynamoid/pull/382) Fixed deprecation warning about `Module#parent_name` in Rails 6 (@tmandke)
123
126
  * Fix: Typos in Readme.md (@romeuhcf)
124
127
 
125
- ---
126
-
127
-
128
-
129
- # 3.3.0
130
-
131
- ## Features
132
-
133
- * Feature: [#374](https://github.com/Dynamoid/dynamoid/pull/374) Add `#project` query method to load only specified fields
134
-
135
- ## Improvements
136
-
137
- * Improvement: [#359](https://github.com/Dynamoid/dynamoid/pull/359) Add support of `NULL` and `NOT_NULL` operators
138
- * Improvement: [#360](https://github.com/Dynamoid/dynamoid/pull/360) Add `store_attribute_with_nil_value` config option
139
- * Improvement: [#368](https://github.com/Dynamoid/dynamoid/pull/368) Support Rails 6 (RC1)
140
-
141
- ## Fixes
142
- * Fix: [#357](https://github.com/Dynamoid/dynamoid/pull/357) Fix synchronous table creation issue
143
- * Fix: [#362](https://github.com/Dynamoid/dynamoid/pull/362) Fix issue with selecting Global Secondary Index (@atyndall)
144
- * Fix: [#368](https://github.com/Dynamoid/dynamoid/pull/368) Repair `#previous_changes` method from Dirty API
145
- * Fix: [#373](https://github.com/Dynamoid/dynamoid/pull/373) Fix threadsafety of loading `Dynamoid::Adapter` (@tsub)
146
-
147
- ---
148
-
149
-
150
-
151
- # 3.2.0
152
-
153
- ## Features
154
- * Feature: [#341](https://github.com/Dynamoid/dynamoid/pull/341), [#342](https://github.com/Dynamoid/dynamoid/pull/342) Add `find_by_pages` method to provide access to DynamoDB query result pagination mechanism (@bmalinconico, @arjes)
155
- * Feature: [#354](https://github.com/Dynamoid/dynamoid/pull/354) Add `map` field type
156
-
157
- ## Improvements
158
- * Improvement: [#340](https://github.com/Dynamoid/dynamoid/pull/340) Improve selecting more optimal GSI for Query operation - choose GSI with sort key if it's used in criteria (@ryz310)
159
- * Improvement: [#351](https://github.com/Dynamoid/dynamoid/pull/351) Add warnings about nonexistent fields in `where` conditions
160
- * Improvement: [#352](https://github.com/Dynamoid/dynamoid/pull/352) Add warning about skipped conditions
161
- * Improvement: [#356](https://github.com/Dynamoid/dynamoid/pull/356) Simplify requiring Rake tasks in non-Rails application
162
- * Improvement: Readme.md. Minor improvements and fixes (@cabello)
163
-
164
-
165
-
166
- # 3.1.0
167
-
168
- ## Improvements
169
- * Feature: [#302](https://github.com/Dynamoid/dynamoid/pull/302) Add methods similar to `ActiveRecord::AttributeMethods::BeforeTypeCast`:
128
+ ## 3.3.0
129
+ ### Added
130
+ * [#374](https://github.com/Dynamoid/dynamoid/pull/374) Add `#project` query method to load only specified fields
131
+
132
+ ### Changed
133
+ * [#359](https://github.com/Dynamoid/dynamoid/pull/359) Add support of `NULL` and `NOT_NULL` operators
134
+ * [#360](https://github.com/Dynamoid/dynamoid/pull/360) Add `store_attribute_with_nil_value` config option
135
+ * [#368](https://github.com/Dynamoid/dynamoid/pull/368) Support Rails 6 (RC1)
136
+
137
+ ### Fixed
138
+ * [#357](https://github.com/Dynamoid/dynamoid/pull/357) Fix synchronous table creation issue
139
+ * [#362](https://github.com/Dynamoid/dynamoid/pull/362) Fix issue with selecting Global Secondary Index (@atyndall)
140
+ * [#368](https://github.com/Dynamoid/dynamoid/pull/368) Repair `#previous_changes` method from Dirty API
141
+ * [#373](https://github.com/Dynamoid/dynamoid/pull/373) Fix threadsafety of loading `Dynamoid::Adapter` (@tsub)
142
+
143
+ ## 3.2.0
144
+ ### Added
145
+ * [#341](https://github.com/Dynamoid/dynamoid/pull/341), [#342](https://github.com/Dynamoid/dynamoid/pull/342) Add `find_by_pages` method to provide access to DynamoDB query result pagination mechanism (@bmalinconico, @arjes)
146
+ * [#354](https://github.com/Dynamoid/dynamoid/pull/354) Add `map` field type
147
+
148
+ ### Changed
149
+ * [#340](https://github.com/Dynamoid/dynamoid/pull/340) Improve selecting more optimal GSI for Query operation - choose GSI with sort key if it's used in criteria (@ryz310)
150
+ * [#351](https://github.com/Dynamoid/dynamoid/pull/351) Add warnings about nonexistent fields in `where` conditions
151
+ * [#352](https://github.com/Dynamoid/dynamoid/pull/352) Add warning about skipped conditions
152
+ * [#356](https://github.com/Dynamoid/dynamoid/pull/356) Simplify requiring Rake tasks in non-Rails application
153
+ * Readme.md. Minor improvements and Fixed (@cabello)
154
+
155
+ ## 3.1.0
156
+ ### Added
157
+ * [#302](https://github.com/Dynamoid/dynamoid/pull/302) Add methods similar to `ActiveRecord::AttributeMethods::BeforeTypeCast`:
170
158
  * method `attributes_before_type_cast`
171
159
  * method `read_attribte_before_type_cast`
172
160
  * methods `<name>_before_type_cast`
173
- * Feature: [#303](https://github.com/Dynamoid/dynamoid/pull/303) Add `#update_attributes!` method
174
- * Feature: [#304](https://github.com/Dynamoid/dynamoid/pull/304) Add `inheritance_field` option for `Document.table` method to specify column name for supporting STI and storing class name
175
- * Feature: [#305](https://github.com/Dynamoid/dynamoid/pull/305) Add increment/decrement methods:
161
+ * [#303](https://github.com/Dynamoid/dynamoid/pull/303) Add `#update_attributes!` method
162
+ * [#304](https://github.com/Dynamoid/dynamoid/pull/304) Add `inheritance_field` option for `Document.table` method to specify column name for supporting STI and storing class name
163
+ * [#305](https://github.com/Dynamoid/dynamoid/pull/305) Add increment/decrement methods:
176
164
  * `#increment`
177
165
  * `#increment!`
178
166
  * `#decrement`
179
167
  * `#decrement!`
180
168
  * `.inc`
181
- * Feature: [#307](https://github.com/Dynamoid/dynamoid/pull/307) Allow to declare type of elements in `array`/`set` fields with `of` option. Only scalar types are supported as well as custom types
182
- * Feature: [#312](https://github.com/Dynamoid/dynamoid/pull/312) Add Ability to specify network timeout connection settings (@lulu-ulul)
183
- * Feature: [#313](https://github.com/Dynamoid/dynamoid/pull/313) Add support for backoff in scan and query (@bonty)
184
- * Improvement: [#314](https://github.com/Dynamoid/dynamoid/pull/314) Re-implement `count` for `where`-chain query efficiently. So now `where(...).count` doesn't load all the documents, just statistics
185
-
186
- ## Fixes
187
- * Bug: [#298](https://github.com/Dynamoid/dynamoid/pull/298) Fix `raw` field storing when value is a Hash with non-string keys
188
- * Bug: [#299](https://github.com/Dynamoid/dynamoid/pull/299) Fix `raw` fields - skip empty strings and sets
189
- * Bug: [#309](https://github.com/Dynamoid/dynamoid/pull/309) Fix loading of a document that contains not declared in model class fields
190
- * Bug: [#310](https://github.com/Dynamoid/dynamoid/pull/310) Fix `Adapter#list_tables` method to return names of all tables, not just first page (@knovoselic)
191
- * Bug: [#311](https://github.com/Dynamoid/dynamoid/pull/311) Fix `consistent_read` option of `.find` (@kokuyouwind)
192
- * Bug: [#319](https://github.com/Dynamoid/dynamoid/pull/319) Repair consistent reading for `find_all`
193
- * Bug: [#317](https://github.com/Dynamoid/dynamoid/pull/317) Fix `create_tables` rake task
194
-
195
-
196
-
197
- # 3.0.0
198
-
199
- ## Breaking
200
-
201
- * Maintenance: [#267](https://github.com/Dynamoid/dynamoid/pull/267) Upgrade AWS SDK to V3
202
- * Maintenance: [#268](https://github.com/Dynamoid/dynamoid/pull/268) Drop support of old Ruby versions. Support Ruby since 2.3 version
203
- * Maintenance: [#268](https://github.com/Dynamoid/dynamoid/pull/268) Drop support of old Rails versions. Support Rails since 4.2 version
204
- * Improvement: [#278](https://github.com/Dynamoid/dynamoid/pull/278) Add type casting for finders (`find`, `find_by_id` and `find_all`)
205
- * Improvement: [#279](https://github.com/Dynamoid/dynamoid/pull/279) Change default value of `application_timezone` config option from `:local` to `:utc`
206
- * Feature: [#288](https://github.com/Dynamoid/dynamoid/pull/288) Add `store_boolean_as_native` config option and set it to `true` by default. So all boolean fields are stored not as string `'t'` and `'f'` but as native boolean values now
207
- * Feature: [#289](https://github.com/Dynamoid/dynamoid/pull/289) Add `dynamodb_timezone` config option and set it to `:utc` by default. So now all `date` and `datetime` fields stored in string format will be converted to UTC time zone by default
208
-
209
- ## Improvements
210
-
211
- * Improvement: [#261](https://github.com/Dynamoid/Dynamoid/pull/261) Improve documentation (@walkersumida)
212
- * Improvement: [#264](https://github.com/Dynamoid/Dynamoid/pull/264) Improve documentation (@xbx)
213
- * Improvement: [#278](https://github.com/Dynamoid/Dynamoid/pull/278) Add Rails-like type casting
214
- * Maintenance: [#281](https://github.com/Dynamoid/Dynamoid/pull/281) Deprecate dynamic finders, `find_all`, `find_by_id`, `find_by_composite_key`, `find_all_by_composite_key` and `find_all_by_secondary_index`
215
- * Improvement: [#285](https://github.com/Dynamoid/Dynamoid/pull/285) Set timestamps (`created_at` and `updated_at`) in `upsert`, `update_fields`, `import` and `update` methods
216
- * Improvement: [#286](https://github.com/Dynamoid/Dynamoid/pull/286) Disable scan warning when intentionally loading all items from a collection (@knovoselic)
217
-
218
- ## Fixes
219
-
169
+ * [#307](https://github.com/Dynamoid/dynamoid/pull/307) Allow to declare type of elements in `array`/`set` fields with `of` option. Only scalar types are supported as well as custom types
170
+ * [#312](https://github.com/Dynamoid/dynamoid/pull/312) Add Ability to specify network timeout connection settings (@lulu-ulul)
171
+ * [#313](https://github.com/Dynamoid/dynamoid/pull/313) Add support for backoff in scan and query (@bonty)
172
+
173
+ ### Changed
174
+ * [#314](https://github.com/Dynamoid/dynamoid/pull/314) Re-implement `count` for `where`-chain query efficiently. So now `where(...).count` doesn't load all the documents, just statistics
175
+
176
+ ### Fixed
177
+ * [#298](https://github.com/Dynamoid/dynamoid/pull/298) Fix `raw` field storing when value is a Hash with non-string keys
178
+ * [#299](https://github.com/Dynamoid/dynamoid/pull/299) Fix `raw` fields - skip empty strings and sets
179
+ * [#309](https://github.com/Dynamoid/dynamoid/pull/309) Fix loading of a document that contains not declared in model class fields
180
+ * [#310](https://github.com/Dynamoid/dynamoid/pull/310) Fix `Adapter#list_tables` method to return names of all tables, not just first page (@knovoselic)
181
+ * [#311](https://github.com/Dynamoid/dynamoid/pull/311) Fix `consistent_read` option of `.find` (@kokuyouwind)
182
+ * [#319](https://github.com/Dynamoid/dynamoid/pull/319) Repair consistent reading for `find_all`
183
+ * [#317](https://github.com/Dynamoid/dynamoid/pull/317) Fix `create_tables` rake task
184
+
185
+ ## 3.0.0
186
+ ### Changed
187
+ * BREAKING [#267](https://github.com/Dynamoid/dynamoid/pull/267) Upgrade AWS SDK to V3
188
+ * BREAKING [#268](https://github.com/Dynamoid/dynamoid/pull/268) Drop support of old Ruby versions. Support Ruby since 2.3 version
189
+ * BREAKING [#268](https://github.com/Dynamoid/dynamoid/pull/268) Drop support of old Rails versions. Support Rails since 4.2 version
190
+ * BREAKING [#278](https://github.com/Dynamoid/dynamoid/pull/278) Add type casting for finders (`find`, `find_by_id` and `find_all`)
191
+ * BREAKING [#279](https://github.com/Dynamoid/dynamoid/pull/279) Change default value of `application_timezone` config option from `:local` to `:utc`
192
+ * BREAKING [#288](https://github.com/Dynamoid/dynamoid/pull/288) Add `store_boolean_as_native` config option and set it to `true` by default. So all boolean fields are stored not as string `'t'` and `'f'` but as native boolean values now
193
+ * BREAKING [#289](https://github.com/Dynamoid/dynamoid/pull/289) Add `dynamodb_timezone` config option and set it to `:utc` by default. So now all `date` and `datetime` fields stored in string format will be converted to UTC time zone by default
194
+ * [#261](https://github.com/Dynamoid/Dynamoid/pull/261) Improve documentation (@walkersumida)
195
+ * [#264](https://github.com/Dynamoid/Dynamoid/pull/264) Improve documentation (@xbx)
196
+ * [#278](https://github.com/Dynamoid/Dynamoid/pull/278) Add Rails-like type casting
197
+ * [#281](https://github.com/Dynamoid/Dynamoid/pull/281) Deprecate dynamic finders, `find_all`, `find_by_id`, `find_by_composite_key`, `find_all_by_composite_key` and `find_all_by_secondary_index`
198
+ * [#285](https://github.com/Dynamoid/Dynamoid/pull/285) Set timestamps (`created_at` and `updated_at`) in `upsert`, `update_fields`, `import` and `update` methods
199
+ * [#286](https://github.com/Dynamoid/Dynamoid/pull/286) Disable scan warning when intentionally loading all items from a collection (@knovoselic)
200
+
201
+ ### Fixed
220
202
  * Bug: [#275](https://github.com/Dynamoid/Dynamoid/pull/275) Fix custom type serialization/deserialization
221
203
  * Bug: [#283](https://github.com/Dynamoid/Dynamoid/pull/283) Fix using string formats for partition and sort keys of `date`/`datetime` type
222
204
  * Bug: [#283](https://github.com/Dynamoid/Dynamoid/pull/283) Fix type declaration of custom type fields. Returned by `.dynamoid_field_type` value is treated as Dynamoid's type now
223
205
  * Bug: [#287](https://github.com/Dynamoid/Dynamoid/pull/287) Fix logging disabling (@ghiculescu)
224
206
 
225
- # 2.2.0
226
-
227
- ## Breaking
228
-
229
- * N/A
230
-
231
- ## Improvements
232
-
207
+ ## 2.2.0
208
+ ### Changed
233
209
  * Feature: [#256](https://github.com/Dynamoid/Dynamoid/pull/256) Support Rails 5.2 (@andrykonchin)
234
210
 
235
- ## Fixes
236
-
211
+ ### Fixed
237
212
  * Bug: [#255](https://github.com/Dynamoid/Dynamoid/pull/255) Fix Vagrant RVM configuration and upgrade to Ruby 2.4.1 (@richardhsu)
238
213
 
239
- # 2.1.0
240
-
241
- ## Breaking
242
-
243
- * N/A
244
-
245
- ## Improvements
246
-
214
+ ## 2.1.0
215
+ ### Changed
247
216
  * Feature: [#221](https://github.com/Dynamoid/Dynamoid/pull/221) Add field declaration option `of` to specify the type of `set` elements (@pratik60)
248
217
  * Feature: [#223](https://github.com/Dynamoid/Dynamoid/pull/223) Add field declaration option `store_as_string` to store `datetime` as ISO-8601 formatted strings (@william101)
249
218
  * Feature: [#228](https://github.com/Dynamoid/Dynamoid/pull/228) Add field declaration option `store_as_string` to store `date` as ISO-8601 formatted strings (@andrykonchin)
@@ -256,8 +225,7 @@
256
225
  * added `constant` and `exponential` built-in backoff strategies
257
226
  * `.find_all` and `.import` support new backoff options
258
227
 
259
- ## Fixes
260
-
228
+ ### Fixed
261
229
  * Bug: [#216](https://github.com/Dynamoid/Dynamoid/pull/216) Fix global index detection in queries with conditions other than equal (@andrykonchin)
262
230
  * Bug: [#224](https://github.com/Dynamoid/Dynamoid/pull/224) Fix how `contains` operator works with `set` and `array` field types (@andrykonchin)
263
231
  * Bug: [#225](https://github.com/Dynamoid/Dynamoid/pull/225) Fix equal conditions for `array` fields (@andrykonchin)
@@ -268,82 +236,77 @@
268
236
  * Bug: [#250](https://github.com/Dynamoid/Dynamoid/pull/250) Update outdated warning message about inefficient query and missing indices (@andrykonchin)
269
237
  * Bug: [252](https://github.com/Dynamoid/Dynamoid/pull/252) Don't loose nanoseconds when store DateTime as float number
270
238
 
271
- # 2.0.0
272
-
273
- ## Breaking
274
-
239
+ ## 2.0.0
275
240
  Breaking changes in this release generally bring Dynamoid behavior closer to the Rails-way.
276
241
 
277
- * Change: [#186](https://github.com/Dynamoid/Dynamoid/pull/186) Consistent behavior for `Model.where({}).all` (@andrykonchin)
278
- * <= 1.3.x behaviour -
279
- * load lazily if user specified batch size
280
- * load all collection into memory otherwise
281
- * New behaviour -
282
- * always return lazy evaluated collection
283
- * It means Model.where({}).all returns Enumerator instead of Array.
284
- * If you need Array interface you have to convert collection to Array manually with to_a method call
285
- * Change: [#195](https://github.com/Dynamoid/Dynamoid/pull/195) Failed `#find` returns error (@andrykonchin)
286
- * <= 1.3.x behaviour - find returns nil or smaller array.
287
- * New behaviour - it raises RecordNotFound if one or more records can not be found for the requested ids
288
- * Change: [#196](https://github.com/Dynamoid/Dynamoid/pull/196) Return value of `#save` (@andrykonchin)
289
- * <= 1.3.x behaviour - save returns self if model is saved successfully
290
- * New behaviour - it returns true
291
-
292
- ## Improvements
293
-
294
- * Feature: [#185](https://github.com/Dynamoid/Dynamoid/pull/185) `where`, finders and friends take into account STI (single table inheritance) now (@andrykonchin)
242
+ ### Added
243
+ * [#199](https://github.com/Dynamoid/Dynamoid/pull/199) Added `Document.import` method (@andrykonchin)
244
+ * [#212](https://github.com/Dynamoid/Dynamoid/pull/212) Add foreign_key option (@andrykonchin)
245
+ * [#213](https://github.com/Dynamoid/Dynamoid/pull/213) Support Boolean raw type (@andrykonchin)
246
+
247
+ ### Changed
248
+ * BREAKING [#186](https://github.com/Dynamoid/Dynamoid/pull/186) Consistent behavior for `Model.where({}).all` (@andrykonchin)
249
+ * <= 1.3.x behaviour -
250
+ * load lazily if user specified batch size
251
+ * load all collection into memory otherwise
252
+ * New behaviour -
253
+ * always return lazy evaluated collection
254
+ * It means Model.where({}).all returns Enumerator instead of Array.
255
+ * If you need Array interface you have to convert collection to Array manually with to_a method call
256
+ * BREAKING [#195](https://github.com/Dynamoid/Dynamoid/pull/195) Failed `#find` returns error (@andrykonchin)
257
+ * <= 1.3.x behaviour - find returns nil or smaller array.
258
+ * New behaviour - it raises RecordNotFound if one or more records can not be found for the requested ids
259
+ * BREAKING [#196](https://github.com/Dynamoid/Dynamoid/pull/196) Return value of `#save` (@andrykonchin)
260
+ * <= 1.3.x behaviour - save returns self if model is saved successfully
261
+ * New behaviour - it returns true
262
+ * [#185](https://github.com/Dynamoid/Dynamoid/pull/185) `where`, finders and friends take into account STI (single table inheritance) now (@andrykonchin)
295
263
  * query will return items of the model class and all subclasses
296
- * Feature: [#190](https://github.com/Dynamoid/Dynamoid/pull/190) Allow passing options to range when defining attributes of the document (@richardhsu)
264
+ * [#190](https://github.com/Dynamoid/Dynamoid/pull/190) Allow passing options to range when defining attributes of the document (@richardhsu)
297
265
  * Allows for serialized fields and passing the serializer option.
298
- * Feature: [#198](https://github.com/Dynamoid/Dynamoid/pull/198) Enhanced `#create` and `#create!` to allow multiple document creation like `#import` (@andrykonchin)
266
+ * [#198](https://github.com/Dynamoid/Dynamoid/pull/198) Enhanced `#create` and `#create!` to allow multiple document creation like `#import` (@andrykonchin)
299
267
  * `User.create([{name: 'Josh'}, {name: 'Nick'}])`
300
- * Feature: [#199](https://github.com/Dynamoid/Dynamoid/pull/199) Added `Document.import` method (@andrykonchin)
301
- * Feature: [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Use batch deletion via `batch_write_item` for `delete_all` (@andrykonchin)
302
- * Rename: [#205](https://github.com/Dynamoid/Dynamoid/pull/205) `Chain#destroy_all` as `Chain#delete_all`, to better match Rails conventions when no callbacks are run (@andrykonchin)
268
+ * [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Use batch deletion via `batch_write_item` for `delete_all` (@andrykonchin)
269
+ * [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Rename `Chain#destroy_all` as `Chain#delete_all`, to better match Rails conventions when no callbacks are run (@andrykonchin)
303
270
  * kept the old name as an alias, for backwards compatibility
304
- * Feature: [#207](https://github.com/Dynamoid/Dynamoid/pull/207) Added slicing by 25 requests in #batch_write_item (@andrykonchin)
305
- * Feature: [#211](https://github.com/Dynamoid/Dynamoid/pull/211) Improved Vagrant setup for testing (@richardhsu)
306
- * Feature: [#212](https://github.com/Dynamoid/Dynamoid/pull/212) Add foreign_key option (@andrykonchin)
307
- * Feature: [#213](https://github.com/Dynamoid/Dynamoid/pull/213) Support Boolean raw type (@andrykonchin)
271
+ * [#207](https://github.com/Dynamoid/Dynamoid/pull/207) Added slicing by 25 requests in #batch_write_item (@andrykonchin)
272
+ * [#211](https://github.com/Dynamoid/Dynamoid/pull/211) Improved Vagrant setup for testing (@richardhsu)
308
273
  * Improved Documentation (@pboling, @andrykonchin)
309
274
 
310
- ## Fixes
311
-
312
- * Bug: [#191](https://github.com/Dynamoid/Dynamoid/pull/191), [#192](https://github.com/Dynamoid/Dynamoid/pull/192) Support lambdas as fix for value types were not able to be used as default values (@andrykonchin)(@richardhsu)
313
- * Bug: [#202](https://github.com/Dynamoid/Dynamoid/pull/202) Fix several issues with associations (@andrykonchin)
275
+ ### Fixed
276
+ * [#191](https://github.com/Dynamoid/Dynamoid/pull/191), [#192](https://github.com/Dynamoid/Dynamoid/pull/192) Support lambdas as fix for value types were not able to be used as default values (@andrykonchin)(@richardhsu)
277
+ * [#202](https://github.com/Dynamoid/Dynamoid/pull/202) Fix several issues with associations (@andrykonchin)
314
278
  * setting `nil` value raises an exception
315
279
  * document doesn't keep assigned model and loads it from the storage
316
280
  * delete call doesn't update cached ids of associated models
317
281
  * fix clearing old `has_many` association while add model to new `has_many` association
318
- * Bug: [#204](https://github.com/Dynamoid/Dynamoid/pull/204) Fixed issue where `Document.where(:"id.in" => [])` would do `Query` operation instead of `Scan` (@andrykonchin)
282
+ * [#204](https://github.com/Dynamoid/Dynamoid/pull/204) Fixed issue where `Document.where(:"id.in" => [])` would do `Query` operation instead of `Scan` (@andrykonchin)
319
283
  * Fixed `Chain#key_present?`
320
- * Bug: [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Fixed `delete_all` (@andrykonchin)
284
+ * [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Fixed `delete_all` (@andrykonchin)
321
285
  * Fixed exception when makes scan and sort key is declared in model
322
286
  * Fixed exception when makes scan and any condition is specified in where clause (like Document.where().delete_all)
323
287
  * Fixed exception when makes query and sort key isn't declared in model
324
- * Bug: [#207](https://github.com/Dynamoid/Dynamoid/pull/207) Fixed `#delete` method for case `adapter.delete(table_name, [1, 2, 3], range_key: 1)` (@andrykonchin)
325
-
326
- # 1.3.4
327
-
328
- ## Improvements
288
+ * [#207](https://github.com/Dynamoid/Dynamoid/pull/207) Fixed `#delete` method for case `adapter.delete(table_name, [1, 2, 3], range_key: 1)` (@andrykonchin)
329
289
 
290
+ ## 1.3.4
291
+ ### Added
330
292
  * Added `Chain#last` method (@andrykonchin)
331
293
  * Added `date` field type (@andrykonchin)
332
294
  * Added `application_timezone` config option (@andrykonchin)
333
- * Allow consistent reading for Scan request (@andrykonchin)
334
- * Use Query instead of Scan if there are no conditions for sort (range) key in where clause (@andrykonchin)
335
295
  * Support condition operators for non-key fields for Query request (@andrykonchin)
336
296
  * Support condition operators for Scan request (@andrykonchin)
337
297
  * Support additional operators `in`, `contains`, `not_contains` (@andrykonchin)
338
298
  * Support type casting in `where` clause (@andrykonchin)
339
- * Rename `Chain#eval_limit` to `#record_limit` (@richardhsu)
299
+ * Allow consistent reading for Scan request (@andrykonchin)
340
300
  * Add `Chain#scan_limit` (@richardhsu)
341
301
  * Support batch loading for Query requests (@richardhsu)
342
302
  * Support querying Global/Local Secondary Indices in `where` clause (@richardhsu)
343
- * Only query on GSI if projects all attributes in `where` clause (@richardhsu)
344
303
 
345
- ## Fixes
304
+ ### Changed
305
+ * Use Query instead of Scan if there are no conditions for sort (range) key in where clause (@andrykonchin)
306
+ * Rename `Chain#eval_limit` to `#record_limit` (@richardhsu)
307
+ * Only query on GSI if projects all attributes in `where` clause (@richardhsu)
346
308
 
309
+ ### Fixed
347
310
  * Fix incorrect applying of default field value (#36 and #117, @andrykonchin)
348
311
  * Fix sync table creation/deletion (#160, @mirokuxy)
349
312
  * Allow to override document timestamps (@andrykonchin)
@@ -354,17 +317,16 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
354
317
  * Fix paginating for Scan requests (@richardhsu)
355
318
  * Fix `batch_get_item` method call for integer partition key (@mudasirraza)
356
319
 
357
- # 1.3.3
358
-
320
+ ## 1.3.3
321
+ ### Added
359
322
  * Allow configuration of the Dynamoid models directory, as not everyone keeps non AR models in app/models
360
323
  - Dynamoid::Config.models_dir = "app/whatever"
361
324
 
362
- # 1.3.2
363
-
325
+ ## 1.3.2
326
+ ### Fixed
364
327
  * Fix migrations by stopping the loading of all rails models outside the rails env.
365
328
 
366
- # 1.3.1
367
-
329
+ ## 1.3.1
368
330
  * Implements #135
369
331
  * dump values for :integer, :string, :boolean fields passed to where query
370
332
  * e.g. You can search for booleans with any of: `[true, false, "t", "f", "true", "false"]`
@@ -377,8 +339,7 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
377
339
  * Added wwtd and appraisal to spec suite for easier verification of the compatibility matrix
378
340
  * Support is now officially Ruby 2.0+, (including JRuby 9000) and Rails 4.0+
379
341
 
380
- # 1.3.0
381
-
342
+ ## 1.3.0
382
343
  * Fixed specs (@AlexNisnevich & @pboling)
383
344
  * Fix `blank?` and `present?` behavior for single associations (#110, @AlexNisnevich & @bayesimpact)
384
345
  * Support BatchGet for more than 100 items (#80, @getninjas)
@@ -391,8 +352,7 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
391
352
  * Better support for raw datatype (#104, @OpenGov)
392
353
  * Fix associative tables with non-id primary keys (#86, @everett-wetchler)
393
354
 
394
- # 1.2.1
395
-
355
+ ## 1.2.1
396
356
  * Remove accidental Gemfile.lock; fix .gitignore (#95, @pboling)
397
357
  * Allow options to put_items (#95, @alexperto)
398
358
  * Support range key in secondary index queries (#95, @pboling)
@@ -400,8 +360,7 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
400
360
  * Support for batch_delete_item API (#95, @pboling)
401
361
  * Support for batch_write_item API (#95, @alexperto)
402
362
 
403
- # 1.2.0
404
-
363
+ ## 1.2.0
405
364
  * Add create_table_syncronously, and sync: option to regular create_table (@pboling)
406
365
  * make required for tables created with secondary indexes
407
366
  * Expose and fix truncate method on adapter (#52, @pcorpet)
@@ -418,13 +377,11 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
418
377
  * Fix query attribute behavior for booleans (#35, @amirmanji)
419
378
  * Ignore unknown fields on model initialize (PR #33, @sumocoder)
420
379
 
421
- # 1.1.0
422
-
380
+ ## 1.1.0
423
381
  * Added support for optimistic locking on delete (PR #29, @sumocoder)
424
382
  * upgrade concurrent-ruby requirement to 1.0 (PR #31, @keithmgould)
425
383
 
426
- # 1.0.0
427
-
384
+ ## 1.0.0
428
385
  * Add support for AWS SDK v2.
429
386
  * Add support for custom class type for fields.
430
387
  * Remove partitioning support.