dynamodb-toolbox icon indicating copy to clipboard operation
dynamodb-toolbox copied to clipboard

Add possibility to reference a secondary attribute in a condition clause

Open craPkit opened this issue 3 years ago • 3 comments

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.

craPkit avatar Mar 08 '21 12:03 craPkit

Can you add this to the README too?

darbio avatar Mar 24 '21 19:03 darbio

@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 🙏🏼

rbdmorgan avatar Jul 20 '22 15:07 rbdmorgan

@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.

craPkit avatar Jul 21 '22 09:07 craPkit

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!

naorpeled avatar Sep 25 '22 17:09 naorpeled