gpt4 book ai didi

ios - 发电机 : The attempted filter operation is not supported for the provided filter argument count

转载 作者:可可西里 更新时间:2023-11-01 05:56:08 25 4
gpt4 key购买 nike

我正在使用带有 Amazon Web Services 的 iOS SDK

我正在尝试使用以下代码发出扫描请求:

DynamoDBScanRequest *request = [[DynamoDBScanRequest alloc] initWithTableName:self.tableName];
DynamoDBCondition *condition = [[DynamoDBCondition alloc] init];
[condition setComparisonOperator:@"GT"];
NSString *key = [[alertView textFieldAtIndex:0] text]; //Returns NSString @"00610"

[request setScanFilterValue:condition forKey:key];

DynamoDBScanResponse *response = [self.dbClient scan:request];

我收到这个错误:

The attempted filter operation is not supported for the provided filter argument count

请有人帮忙解释一下这是怎么回事!!!!

最佳答案

Conditions 需要一个特定大小的 AttributeValueList 作为 Condition 名称,基于 Condition 的名称;此错误意味着您尝试将 GT(大于)与错误数量的 attributeValues 一起使用。大于需要 1 个属性值,因此您可能提供 0 或 2。

以下是其他条件,以及它们需要的属性值的数量:

NOT_NULL     0  (exists)
NULL 0 (not exists)
EQ 1 (equal)
NE 1 (not equal)
IN 1 (exact matches)
LE 1 (less than or equal to)
LT 1 (less than)
GE 1 (greater than or equal to)
GT 1 (greater than)
CONTAINS 1 (substring or value in a set)
NOT_CONTAINS 1 (absence of a substring or absence of a value in a set)
BEGINS_WITH 1 (a substring prefix)
BETWEEN 2 (between)

关于ios - 发电机 : The attempted filter operation is not supported for the provided filter argument count,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15666150/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com