0
我是新來的iOS和AWS ...如何從iOS SDK中的SimpleDB AWS中檢索數據並顯示它們?
我一直試圖讓一些方法來從我在AWS上SDB檢索數據...
首先,我想連接到aws然後我想從somedomain中檢索所有內容並將其放入數組中。並讀出數組內部的內容。
// Connecting to SDB
AmazonSimpleDBClient *sdbClient = [[AmazonSimpleDBClient alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY];
@try {
SimpleDBSelectRequest *selectRequest = [[SimpleDBSelectRequest alloc] initWithSelectExpression:@"select * from somedomain"];
selectRequest.consistentRead = YES;
if (self.nextToken != nil) {
selectRequest.nextToken = self.nextToken;
}
SimpleDBSelectResponse *selectResponse = [sdbClient select:selectRequest];
self.nextToken = selectResponse.nextToken;
NSLog(self.nextToken);
}
@catch (NSException *exception) {
NSLog(@"Exception : [%@]", exception);
}
在此先感謝傢伙。我感謝所有的幫助。 :)
Hi @Ashish Pancholi,在ios中我如何刪除simpledb中的一行。 – Vendetta
@Vendetta請參閱上面的'private boolean deleteItem(String domain,String itemName)'方法。您可以通過僅指定刪除請求中的項目名稱來刪除行。 –
@Vendetta https://github.com/aws/aws-sdk-ios/blob/master/src/Amazon.SimpleDB/Model/SimpleDBBatchDeleteAttributesRequest.m –