-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to apply filter expressions to Query for Numbers and Boolean fields #262
Comments
Hello, I am trying to create a repository using @query. Below is the sample code. What could be the reason? 2021-07-11 15:45:34.632 INFO 30940 --- [ main] o.s.s.d.d.r.s.DynamoDBRepositoryFactory : Spring Data DynamoDB Version: 5.2.5 (2.2) |
With Reference to
#27 and
https://github.com/boostchicken/spring-data-dynamodb/wiki/Change-Log
We now have an option to filter the Query Result using filterExpression as below.
With static parameters
@query(fields = "leaveDate", limit = 1, filterExpression = "contains(#field, :value)",
expressionMappingNames = {@ExpressionAttribute(key = "#field", value = "name")},
expressionMappingValues = {@ExpressionAttribute(key=":value", value = "projection")})
List findByPostCode(String postCode);
With dynamic parameters from methods
But Is there any option or feature available to filter the result based on a field which is of Type Number and Boolean.
Let's say In Table I have Price column of type Number and I want to filter the final result based on Price >=100.
Then how can we achieve it with filterExpression as ExpressionAttribute has only key, value and parameterName which all are of type String.
Specifications
All those information are logged by
org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory
onINFO
level on startup.Or use
java -version
andmvn dependency:tree | grep -E 'spring|aws'
to provide those version numbers.The text was updated successfully, but these errors were encountered: