我的老板让我制作一个不识别大小写字母的过滤器,我添加了以下代码来制作过滤器但识别大小写字母的使用并且没有找到任何东西
DynamoDBMapper mapper = new DynamoDBMapper(amazonDynamoDB);
DynamoDBScanExpression scanExpression = new DynamoDBScanExpression();
Map<String, AttributeValue> eav = new HashMap<String, AttributeValue>();
Map<String, String> ean = new HashMap<String, String>();
StringJoiner where = new StringJoiner(" and ");
if (status != null) {
eav.put(":status", new AttributeValue().withS(status));
where.add("#status = :status");
ean.put("#status", "status");
scanExpression.withExpressionAttributeNames(ean);
}
if (where.length() > 0) {
scanExpression.withFilterExpression(where.toString()).withExpressionAttributeValues(eav).withConsistentRead(false);
}
// Scan to the end of the page after the requested page
int scanTo = (int) (pageable.getOffset() + (2 * pageable.getPageSize()));