スキャンしてフィルターで除外したいデータセットがあります。
テーブルで次の 2 つの値を除外したいと考えています。
- F7138546-5819-4534-98F8-959A2B8DC06E
- DFG83855-FF86-440D-8CA0-15A2709A58E8
attribute.SS に 2 つのデータを入力するのは正しいですか? この機能を達成する別の方法はありますか? 私はこれについて非常に長い間考えてきたので、私を助けてください。つまり、ハッシュ キーは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]
有難うございます。ありがとうございました