我有一个要扫描并过滤掉的数据集。
我想在我的表中过滤掉这两个值:
- F7138546-5819-4534-98F8-959A2B8DC06E
- DFG83855-FF86-440D-8CA0-15A2709A58E8
在attribute.SS中输入这两个数据对吗?我还有其他方法可以实现此功能吗?请帮助我,因为我已经考虑了很长时间。条件应该是or
,也就是说,哈希键不会是值 a 或值 b,而不是既不是 a 也不是 b。
AWSDynamoDBObjectMapper *objectMapper = [AWSDynamoDBObjectMapper defaultDynamoDBObjectMapper];
AWSDynamoDBScanExpression *scanExpression = [AWSDynamoDBScanExpression new];
scanExpression.exclusiveStartKey = self.lastEvaluatedKey;
scanExpression.limit = @20;
attribute.SS = @[@"F7138546-5819-4534-98F8-959A2B8DC06E",@"DFG83855-FF86-440D-8CA0-15A2709A58E8"];
AWSDynamoDBCondition *condition = [AWSDynamoDBCondition new];
condition.attributeValueList = @[attribute];
condition.comparisonOperator = AWSDynamoDBComparisonOperatorNE;
scanExpression.scanFilter = @{@"hashKey":condition};
return [[[objectMapper scan:[DDBTableRow class]
expression:scanExpression]
谢谢你。再次感谢你