dynamodb-toolbox
dynamodb-toolbox copied to clipboard
Cannot reference secondary attributes in condition clauses
I'd like to be able to reference attributes (as an alternative to passing static values) in condition clauses.
const TestEntity = new Entity({
name: 'TestEntity',
attributes: {
pk: { partitionKey: true },
a: 'string',
b: 'string',
c: 'string',
d: 'string',
x: 'string',
y: 'string'
},
table: TestTable
});
TestEntity.update({
...
conditions: { attr: 'a', eq: { attr: 'b' } } // yields 'ConditionExpression: "#attr_a > #attr_b"'
});