【发布时间】:2018-06-29 13:15:34
【问题描述】:
我使用 QueryRequest 从 dynomoDb 获取结果,如果我单独发送 emp_id,它会返回结果。假设如果我再传递一个查询参数,它会返回
不支持查询键条件
请检查下面提到的代码,如果有任何错误,请告诉我。
var _request = new QueryRequest
{
TableName = "Attendence",
KeyConditionExpression = "Roster_EmpID = :Roster_EmpID and Roster_CreatedDateTime between :v_start and :v_end",
ExpressionAttributeValues = new Dictionary<string, AttributeValue> {
{":Roster_EmpID", new AttributeValue { S = result.empId }}
,{":v_start", new AttributeValue { S = result.fromDate.ToString(AWSSDKUtils.ISO8601DateFormat) }}
,{":v_end", new AttributeValue { S = result.toDate.ToString(AWSSDKUtils.ISO8601DateFormat) }}
},
IndexName = "Roster_EmpID-index"
};
即使我正在传递 aws 日期格式 (AWSSDKUtils.ISO8601DateFormat),也很难找到解决方案。请帮我找出问题。
【问题讨论】:
标签: c# amazon-web-services amazon-dynamodb