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