File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,9 @@ and this project adheres to
13
13
### Added
14
14
15
15
- Support ` consistentRead ` option on ` get ` API
16
+
17
+ ## 1.5.0 - 2021-10-27
18
+
19
+ ### Added
20
+
21
+ - Support optimistic locking for ` put ` , ` update ` and ` delete ` APIs
Original file line number Diff line number Diff line change @@ -151,8 +151,19 @@ available toggles:
151
151
provide the current version number. If an out-of-date version number is
152
152
supplied, an error will be thrown.
153
153
154
+ Example of Dao constructed with optimistic locking enabled.
155
+
156
+ ```
157
+ const dao = new DynamoDbDao<DataModel, KeySchema>({
158
+ tableName,
159
+ documentClient,
160
+ optimisticLockingAttribute: 'version',
161
+ });
162
+ ```
163
+
154
164
2 . If you wish to ignore optimistic locking for a save operation, specify
155
- ` ignoreOptimisticLocking: true ` on your ` put ` , ` update ` , or ` delete ` .
165
+ ` ignoreOptimisticLocking: true ` in the options on your ` put ` , ` update ` , or
166
+ ` delete ` .
156
167
157
168
NOTE: Optimistic locking is NOT supported for ` batchWrite ` or ` batchPut `
158
169
operations. Consuming those APIs for data models that do have optimistic locking
You can’t perform that action at this time.
0 commit comments