-
Notifications
You must be signed in to change notification settings - Fork 5
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
beyonce.batchWriteWithTransaction with Updates #64
Comments
Related to the same update use case, partial updates like this does not work, because the lens does not have access to the actual value. Can the generated expression detect that and add a update expression with + :1 ?
|
Hey,
Not currently, no. Right now we support puts + deletes via batchWrite, but not (yet) updates.
This isn't currently supported, but should be possible. Dynamo supports an Of the top of my head, I'm not sure if JS proxies can differentiate between Re: batch updates, it'd be nice to preserve the same syntax as the singular update method, so maybe something like this: await beyonce.batchWrite({
putItems: [ ... ],
deleteItems: [ ... ],
updateItems: [
[AuthorModel.key({ id: "1" }), (author) => { author.bookCount.add(1) }]
]
}) I'm out of office for the next month, so will be slow to respond, but either of these we'd be happy to accept a PR for. Otherwise, I can probably get to this when I'm back. |
Is there a way to do batch write with updates, puts and deletes ?
I think I red on the doc that conditional updates are not yet possible to ?!
Right now I am using the dynamodb client to make something like this work :
Thank you so much again for this library, Beyonce rocks !
The text was updated successfully, but these errors were encountered: