2 回答
TA贡献1966条经验 获得超4个赞
IndexName除了TableName之外,在创建QueryInput来查询索引时还需要指定该属性。
// The name of an index to query. This index can be any local secondary index
// or global secondary index on the table. Note that if you use the IndexName
// parameter, you must also provide TableName.
IndexName *string `min:"3" type:"string"`
TA贡献1805条经验 获得超9个赞
var queryInput, err2 = svc.Query(&dynamodb.QueryInput{
TableName: aws.String(tableName),
IndexName: aws.String(index_name),
KeyConditions: map[string]*dynamodb.Condition{
"Phone": {
ComparisonOperator: aws.String("EQ"),
AttributeValueList: []*dynamodb.AttributeValue{
{
S: aws.String(phone_no),
},
},
},
},
})
- 2 回答
- 0 关注
- 185 浏览
添加回答
举报