-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increment value in DynamoDB table #71
Comments
You can use update query to increment attribute value:
FYI, All of maintainers of dynamo-types left Vingle, Inc. (which is owner of this repository.) Unfortunately, We couldn't get permissions from Company - We lost all permissions about this repository (including access credentials for accessing NPM). So, We've forked this repo to serverless-seoul/dynamorm. We won't make any further updates on this repository. Please leave an issue to forked repository if you have further questions. Thanks. cc/ @breath103 |
Hi! Thanks for the library! I've a question: Is it possible to update an item stored in the dynamoDB table incrementing a value without read it, update the value and finally write again.
Using the aws-sdk you can do something like it:
dynamoDB.updateItem({ TableName: "Users", Key: { "UserId": { S: "c6af9ac6-7b61" } }, ExpressionAttributeValues: { ":inc": {N: "1"} }, UpdateExpression: "ADD loginCount :inc" })
Thanks!
The text was updated successfully, but these errors were encountered: