java - DynamoDB. How to scan list with contains -


valuemap attributes = new valuemap() .withboolean( ":p_deleted", true ) .withstring( ":p_prefix", prefix ); scanspec scanspec = new scanspec() .withfilterexpression( uawsbasic.database_json_definition_name + ".deleted = :p_deleted , " + dynamodbcommon.range_key_name + " contains :p_prefix" ).withvaluemap( attributes );  itemcollection< scanoutcome > items1 = dynamodbcommon.scanlist(gettablename(), scanspec ); 

how items list?

i need not deleted items prefix.

i have error:

caused by: com.amazonaws.amazonserviceexception: invalid filterexpression: syntax error; token: "contains", near: "path contains :p_prefix" 

i've tried write simmilar scan-request:

scanspec scanspec = new scanspec().withscanfilters( new scanfilter[] { typefilter, deletedfilter } ).withconditionaloperator( conditionaloperator.and ); 

but doesn't work.

 valuemap values = new valuemap().withstring( ":p_status", "ready" ).withstring( ":p_prefix", prefix );  namemap names = new namemap().with( "#status_name", "status" ).with( "#path_name", cdynamodbcommon.range_key_name );   scanspec = new scanspec()     .withfilterexpression( uawsbasic.database_json_definition_name + ".#status_name = :p_status , contains( #path_name , :p_prefix)" )     .withnamemap( names ).withvaluemap( values )     .withmaxresultsize( 10 ).withexclusivestartkey( cdynamodbcommon.primary_key_name, primarylast, cdynamodbcommon.range_key_name, hashlast ); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -