dynamodb-toolbox
dynamodb-toolbox copied to clipboard
Add possibility to reference a secondary attribute in a condition clause
Implements #142
Supports referenced attributes on FilterExpressions' fields 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte'.
How To:
TestEntity.update({
// ...
conditions: { attr: 'a', eq: { attr: 'b' } }
});
Positive and negative tests included.
Can you add this to the README too?
@craPkit this is a nice feature would be great to see it merged 😄
I added support for nested attribute conditions and filters in #288, #294 and #297 so you'll need to merge main and adapt this PR accordingly but shouldn't be too much work and the collective changes will complement each other nicely 🙏🏼
@craPkit this is a nice feature would be great to see it merged 😄
I added support for nested attribute conditions and filters in #288, #294 and #297 so you'll need to merge main and adapt this PR accordingly but shouldn't be too much work and the collective changes will complement each other nicely 🙏🏼
Main is merged now. I haven't implemented nested attributes in my AttrRefs though, since, being ignorant of your feature, I wasn't sure which cases need to be covered.
Hey @craPkit , first of all, thanks for creating this PR, you're awesome!
Sorry for the late reply to this. Will review this PR in a bit and will aim to merge this asap, this is a great addition to the library!