I want to return the count of items in this domain. I know count (*) returns one item called Domain with an attribute called Count. How do I get Count's value?
@try {
SimpleDBSelectRequest *selectRequest2 = [[SimpleDBSelectRequest alloc] initWithSelectExpression:@"select count(*) from %@"];
SimpleDBSelectResponse *selectResponse = [[AmazonClientManager sdb] select:selectRequest2];
for (SimpleDBItem *item in selectResponse.items) {
if ( [item.name isEqualToString:@"Domain"])
{
NSLog(@"Attributes = %@",[item.attributes objectAtIndex:0]);
}
}
}
@catch (AmazonServiceException *exception) {
NSLog(@"Exception = %@", exception);
}
I get this for Attributes:
Attributes = {Name: Count,AlternateNameEncoding: (null),Value: 3,AlternateValueEncoding: (null),<SimpleDBAttribute: 0x8667120>}
How do I get the Value 3 out of it?