mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(dynamodb): prefix the Select conflict errors of Query and Scan (#5562)
This commit is contained in:
1 parent
2a04cd78c7
commit
9c9e5a1464
3 files changed
+50
-6
No files matched your search
+4
-2
@@ -56,11 +56,13 @@ final class DynamoDbAccessPathValidator {
|
||||
String select, String projectionExpression,
|
||||
JsonNode attributesToGet, JsonNode expressionAttributeNames) {
|
||||
if (projectionExpression != null && select != null && !"SPECIFIC_ATTRIBUTES".equals(select)) {
|
||||
throw validationException("Cannot specify the ProjectionExpression when choosing to get "
|
||||
throw validationException("1 validation error detected: "
|
||||
+ "Cannot specify the ProjectionExpression when choosing to get "
|
||||
+ ("COUNT".equals(select) ? "only the Count" : select));
|
||||
}
|
||||
if ("ALL_PROJECTED_ATTRIBUTES".equals(select) && !accessPath.isIndex()) {
|
||||
throw validationException("ALL_PROJECTED_ATTRIBUTES can be used only when Querying using an IndexName");
|
||||
throw validationException("1 validation error detected: "
|
||||
+ "ALL_PROJECTED_ATTRIBUTES can be used only when Querying using an IndexName");
|
||||
}
|
||||
if (attributesToGet != null && select != null && !"SPECIFIC_ATTRIBUTES".equals(select)) {
|
||||
throw validationException("Cannot use both Select and AttributesToGet unless Select is SPECIFIC_ATTRIBUTES");
|
||||
|
||||
Reference in new issue
Block a user