-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Cannot use between operator with key conditions due to following code.
https://github.com/victorquinn/dynasty/blob/master/src/lib/aws-translators.coffee
line 14 - target[filter.column].AttributeValueList[0][filter.type || 'S'] = filter.value
Between operator should be like this.
"ComparisonOperator":"BETWEEN", "AttributeValueList": [ {"S": "A"}, {"S": "M"} ]
@victorquinn can we fix this by checking if filter.op Between at line 14 or any quick workaround?
current {keyConditions: [{column: 'createdDate', op: 'BETWEEN', value: '4'}]}
suggestion {keyConditions: [{column: 'createdDate', op: 'BETWEEN', value: ['4', '6']}]}
And then update line 14 accordingly. Will this work?
filterValues = _.isArray(filter.value)?filter.value:[filter.value]
filterValues.forEach((value, key) => target[filter.column].AttributeValueList[key][filter.type || 'S'] = value)