mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix: accept AttributesToGet with Select=SPECIFIC_ATTRIBUTES in Query (#1190)
This commit is contained in:
1 parent
10e28f33c2
commit
70acf49b00
2 files changed
+127
-1
No files matched your search
@@ -680,6 +680,11 @@ public class DynamoDbJsonHandler {
|
||||
"Can not use both expression and non-expression parameters in the same request: "
|
||||
+ "Non-expression parameters: {QueryFilter} Expression parameters: {FilterExpression}", 400);
|
||||
}
|
||||
if (attributesToGet != null && projectionExpression != null) {
|
||||
throw new AwsException("ValidationException",
|
||||
"Can not use both expression and non-expression parameters in the same request: "
|
||||
+ "Non-expression parameters: {AttributesToGet} Expression parameters: {ProjectionExpression}", 400);
|
||||
}
|
||||
|
||||
if (keyConditionExpr == null && keyConditions == null) {
|
||||
throw new AwsException("ValidationException",
|
||||
@@ -698,7 +703,8 @@ public class DynamoDbJsonHandler {
|
||||
+ "Member must satisfy enum value set: [SPECIFIC_ATTRIBUTES, COUNT, ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES]", 400);
|
||||
}
|
||||
|
||||
if ("SPECIFIC_ATTRIBUTES".equals(select) && projectionExpression == null) {
|
||||
boolean hasAttributesToGet = attributesToGet != null && attributesToGet.size() > 0;
|
||||
if ("SPECIFIC_ATTRIBUTES".equals(select) && projectionExpression == null && !hasAttributesToGet) {
|
||||
throw new AwsException("ValidationException",
|
||||
"Select type SPECIFIC_ATTRIBUTES requires the ProjectionExpression to be provided.", 400);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user