dynalite
dynalite copied to clipboard
Add TransactWriteItems
An expansion on this PR from mid-2020, this PR implements TransactWriteItems.
related to #98
Addresses #98
any update from this?
Great PR, would love to see it merged.
I've been using a local build of this branch for testing my own code for several months and haven't found any issues. I'd say this is ready for review/to be merged!
@mhart
Any update on this? Would love to see it merged in….
Likewise!
Is there a reason that prevents this PR from being merged? Something we could help with?
@jpeterschmidt There is a bug in the transaction implementation: Condition checks apparently don't work
await client
.put({
TableName: "someTable",
Item: {
streamId: "someAggregateId",
version: 1,
},
})
.promise();
// this works as expected: condition is not met, op fails
try {
await client
.put({
TableName: "someTable",
ConditionExpression: "attribute_not_exists(version)",
Item: {
streamId: "someAggregateId",
version: 1,
},
})
.promise();
}
// this does NOT works as expected: condition is not met, but op succeeds
try {
await client
.transactWrite({
TransactItems: [
{
Put: {
TableName: tableName,
ConditionExpression: "attribute_not_exists(version)",
Item: {
streamId: "someAggregateId",
version: 1,
},
},
},
],
})
.promise();
}
Any news ? I would like to see that feature :(
@florianbepunkt Just pushed a commit that should fix your issue; I mistakenly omitted checking ConditionExpressions from Puts and Deletes. Pretty big miss on my part - thanks for catching!
@scorsi @bbbates @ajoslin no updates from me; maybe @mhart can weigh in on what else needs to happen!
Any news on this?
cc @mhart
any news?
@mhart Would there be any chance of merging and releasing TransactWrite support?
I have been using a fork of the repo with only this PR merged: https://github.com/c-py/dynalite
It's working really well, would love to see this merged and on NPM.
@jpeterschmidt thank you so much for all the legwork you did on this PR! It's chonky and will take me a while to review, but reviewed it shall be. Are you amenable to picking it back up together? Thanks in advance!
hey @ryanblock, absolutely! I'll spend some time this week getting familiar again with what I did.
@jpeterschmidt great news! I'll dig into it as well and provide any additional specific feedback (although tbh right now you probably know this codebase better than I do!). Also, if you'd like to get more real-time, please find us in our Discord's dynalite channel.
Earlier today I updated the linting on this project, and pulled those changes (and related fixes the linter caught) over here: https://github.com/architect/dynalite/pull/174 – @jpeterschmidt I don't have write access to this PR, so would you like to merge that branch into this one?