amazon web services - How to query a StringSet value in DynamoDB (iOS)? -
i trying find out how search rows specific tag contained in stringset in aws dynamodb aws sdk v2 ios.
i couldn't find doing in official amazon ios documentation dynamodb, tried expression doesn't work:
let queryexpression = awsdynamodbqueryexpression() queryexpression.limit = 300 queryexpression.filterexpression = "tags contains :tag" queryexpression.expressionattributevalues = [":tag": self.searchquerytag] global.appdelegate().dynamodbobjectmapper.query(blogpost.self, expression: queryexpression) .continuewithblock({(task: awstask) -> anyobject? in if (task.exception != nil || task.error != nil) { completion(response: 0) } else if ((task.result) != nil) { if(task.result!.count > 0) { // list ids… } else { completion(response: 0) } } return nil })
can teach me how query specific string in stringsets (nssets) in dynamodb using aws ios sdk?
change line
queryexpression.filterexpression = "tags contains :tag"
to this
queryexpression.filterexpression = "contains(tags,:tag)"
Comments
Post a Comment