I am having an issue where I am trying to get the data from the DynamoDB directly to my android studio. It works totally fine if I want to query with PK and filter with random column, however, no matter what I do I am unable to use also the sort key. Expression cannot be used as its part of partion key, but it is also not possible to put two primitive types into the query.
I also tried using QueryFilter, however, I am getting has protected access on the code bellow, even if I extend the class.
QueryFilter queryFilter = new QueryFilter();
This is the code which works for query with only Partion Key without Sort Key.
final Expression expression = new Expression();
expression.setExpressionStatement("#t < :time");
//expression.setExpressionStatement("begins_with (#t, :time)");
expression.withExpressionAttibuteValues(":time", new Primitive(timeNow.format(format)));
expression.addExpressionAttributeNames("#t", "time");
Search searchResult = dbTable.query(new Primitive("Location1"), expression);