ios - 在objective-c中带有扫描过滤器的dynamodb scanexpression
<p><pre><code> AWSDynamoDBObjectMapper *dynamoDBObjectMapper = ;
AWSDynamoDBScanExpression *scanExpression = ;
scanExpression.exclusiveStartKey = nil;
scanExpression.limit = @20;
[[
expression:scanExpression]
continueWithExecutor: withSuccessBlock:^id(BFTask *task) { ................
</code></pre>
<p>我能够扫描并返回从我的 DynamoDB 的特定表中记录的前 20 个,如上面的一段代码所示。</p>
<p>现在的问题是我想添加一个 <code>scanExpression.scanFilter =</code> 属性,但我还没有找到关于如何构建它的任何好的方向。我在 <code>xcode6</code></p> 上使用适用于 iOS 的 <code>AWSiOSSDKv2</code> aws sdk
<p>这是我目前所拥有的。还没有完成:</p>
<pre><code> AWSDynamoDBCondition *condition = ;
AWSDynamoDBAttributeValue *attribute = ;
attribute.N = @"400";
condition.comparisonOperator = AWSDynamoDBComparisonOperatorEQ;
NSDictionary *scanFilter = @{@"lat":
@{@"AttributeValueList":attribute,
@"ComparisonOperator":@1}
};
scanExpression.scanFilter = scanFilter;
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>您可以按如下方式使用它:</p>
<pre><code>AWSDynamoDBCondition *condition = ;
AWSDynamoDBAttributeValue *attribute = ;
attribute.N = @"400";
condition.attributeValueList = @;
condition.comparisonOperator = AWSDynamoDBComparisonOperatorEQ;
scanExpression.scanFilter = @{@"lat": condition};
</code></pre></p>
<p style="font-size: 20px;">关于ios - 在objective-c中带有扫描过滤器的dynamodb scanexpression,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/25792359/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/25792359/
</a>
</p>
页:
[1]