Support for Optimistic Concurrency? #259
-
Hi, Not sure how best to implement a version attribute for optimistic concurrency. Does typedorm support this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @refactorthis, Typedorm doesn't have any native features to support optimistic concurrency as it is offloading most of these operational responsibilities to DynamoDB itself. The way you are currently handling the optimistic concurrency (via conditional write) will also work with TypeDORM. You can provide the condition in the options.where property and TypeDORM will generate the appropriate condition expression for you. |
Beta Was this translation helpful? Give feedback.
Hi @refactorthis,
Typedorm doesn't have any native features to support optimistic concurrency as it is offloading most of these operational responsibilities to DynamoDB itself.
The way you are currently handling the optimistic concurrency (via conditional write) will also work with TypeDORM.
You can provide the condition in the options.where property and TypeDORM will generate the appropriate condition expression for you.