I am trying to find out how to search some rows with a specific tag contained in a StringSet in AWS DynamoDB with the AWS SDK v2 for iOS.
I couldn't find anything for doing this in the official Amazon iOS documentation for DynamoDB, so I tried this expression but it 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 ALL IDS…
}
else
{
completion(response: 0)
}
}
return nil
})
Can somebody teach me how to query as specific string in StringSets (NSSets) in DynamoDB by using the AWS iOS SDK?