• <small id='bpYsM'></small><noframes id='bpYsM'>

    <tfoot id='bpYsM'></tfoot>

          <bdo id='bpYsM'></bdo><ul id='bpYsM'></ul>
        <legend id='bpYsM'><style id='bpYsM'><dir id='bpYsM'><q id='bpYsM'></q></dir></style></legend>
        <i id='bpYsM'><tr id='bpYsM'><dt id='bpYsM'><q id='bpYsM'><span id='bpYsM'><b id='bpYsM'><form id='bpYsM'><ins id='bpYsM'></ins><ul id='bpYsM'></ul><sub id='bpYsM'></sub></form><legend id='bpYsM'></legend><bdo id='bpYsM'><pre id='bpYsM'><center id='bpYsM'></center></pre></bdo></b><th id='bpYsM'></th></span></q></dt></tr></i><div id='bpYsM'><tfoot id='bpYsM'></tfoot><dl id='bpYsM'><fieldset id='bpYsM'></fieldset></dl></div>

        AWS DynamoDB 批量获取请求 - iOS

        时间:2023-08-29

          <tbody id='RBpFo'></tbody>
        <legend id='RBpFo'><style id='RBpFo'><dir id='RBpFo'><q id='RBpFo'></q></dir></style></legend>

          <tfoot id='RBpFo'></tfoot>
            <bdo id='RBpFo'></bdo><ul id='RBpFo'></ul>

          • <i id='RBpFo'><tr id='RBpFo'><dt id='RBpFo'><q id='RBpFo'><span id='RBpFo'><b id='RBpFo'><form id='RBpFo'><ins id='RBpFo'></ins><ul id='RBpFo'></ul><sub id='RBpFo'></sub></form><legend id='RBpFo'></legend><bdo id='RBpFo'><pre id='RBpFo'><center id='RBpFo'></center></pre></bdo></b><th id='RBpFo'></th></span></q></dt></tr></i><div id='RBpFo'><tfoot id='RBpFo'></tfoot><dl id='RBpFo'><fieldset id='RBpFo'></fieldset></dl></div>

                  <small id='RBpFo'></small><noframes id='RBpFo'>

                  本文介绍了AWS DynamoDB 批量获取请求 - iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我可以对 AWS dynamoDB 中的单个表执行简单的 Get 请求,但是当我将其扩展为跨多个表的批处理请求时,我继续收到错误

                  I can perform a simple Get request on a singular table within AWS dynamoDB however when I expand it to a Batch Request across multiple tables I continue to get a error

                  validation error detected: Value null at 'requestItems.rip.member.keys' failed to satisfy constraint
                  

                  我理解这是因为值没有正确传递,但我看不出我的代码有什么问题

                  I understand this as the values not being passed correctly but I can't see what the issue is with my code

                  //Create Request Values
                  AWSDynamoDBGetItemInput *getItem = [AWSDynamoDBGetItemInput new];
                  AWSDynamoDBAttributeValue *hashValue = [AWSDynamoDBAttributeValue new];
                  hashValue.S = @"User Test";
                  getItem.key = @{@"ripId": hashValue};
                  
                  //Create Request Values 2 
                  AWSDynamoDBGetItemInput *getItem2 = [AWSDynamoDBGetItemInput new];
                  AWSDynamoDBAttributeValue *hashValue2 = [AWSDynamoDBAttributeValue new];
                  hashValue2.S = @"User Test";
                  getItem2.key = @{@"chat": hashValue2};
                  
                  //Combine to Batch Request
                  AWSDynamoDBBatchGetItemInput * batchFetch = [AWSDynamoDBBatchGetItemInput new];
                  batchFetch.requestItems = @{ @"rip": getItem,
                                               @"chat": getItem,};
                  
                  [[dynamoDB batchGetItem:batchFetch] continueWithBlock:^id(BFTask *task) {
                      if (!task.error) {
                  
                          NSLog(@"BOY SUCCES");
                  
                      } else {
                          NSLog(@" NO BOY SUCCESS %@",task.error);
                      }
                      return nil;
                  }];
                  

                  在互联网上到处搜索,但看不到使用 iOS Objective C(或 swift)的批处理请求的工作示例.

                  Searched the internet high and low but cannot see a working example of a batch request using iOS Objective C (or swift for that matter).

                  我在单个 Get 请求中测试了这两个变量,它们都可以工作.

                  I have tested both variables on a single Get request and they both work.

                  推荐答案

                  您忘记在 AWSDynamoDBKeysAndAttributes 中环绕 AWSDynamoDBAttributeValue.这是一个来自 AWSDynamoDBTests.m:

                  You forgot to wrap around AWSDynamoDBAttributeValue in AWSDynamoDBKeysAndAttributes. Here is a simple example from AWSDynamoDBTests.m:

                  AWSDynamoDBKeysAndAttributes *keysAndAttributes = [AWSDynamoDBKeysAndAttributes new];
                  keysAndAttributes.keys = @[@{@"hashKey" : attributeValue1},
                                             @{@"hashKey" : attributeValue2}];
                  keysAndAttributes.consistentRead = @YES;
                  
                  AWSDynamoDBBatchGetItemInput *batchGetItemInput = [AWSDynamoDBBatchGetItemInput new];
                  batchGetItemInput.requestItems = @{table1Name: keysAndAttributes};
                  

                  这篇关于AWS DynamoDB 批量获取请求 - iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在非关键属性上查询 DynamoDB 下一篇:AWS DynamoDB Objective C 中的递增数字属性

                  相关文章

                  最新文章

                  <legend id='UuC56'><style id='UuC56'><dir id='UuC56'><q id='UuC56'></q></dir></style></legend>

                  1. <tfoot id='UuC56'></tfoot>
                      <bdo id='UuC56'></bdo><ul id='UuC56'></ul>
                    <i id='UuC56'><tr id='UuC56'><dt id='UuC56'><q id='UuC56'><span id='UuC56'><b id='UuC56'><form id='UuC56'><ins id='UuC56'></ins><ul id='UuC56'></ul><sub id='UuC56'></sub></form><legend id='UuC56'></legend><bdo id='UuC56'><pre id='UuC56'><center id='UuC56'></center></pre></bdo></b><th id='UuC56'></th></span></q></dt></tr></i><div id='UuC56'><tfoot id='UuC56'></tfoot><dl id='UuC56'><fieldset id='UuC56'></fieldset></dl></div>

                      <small id='UuC56'></small><noframes id='UuC56'>