我想查询记者表,我想要所有记者,作者姓名以'Josefina'开头。
这是表格属性
var params = {
TableName : "Journalist",
KeySchema: [
{ AttributeName: "author", KeyType: "HASH"},
{ AttributeName: "isShow", KeyType: "RANGE" }
],
AttributeDefinitions: [
{ AttributeName: "author", AttributeType: "S"},
{ AttributeName: "isShow", AttributeType: "S" }
],
ProvisionedThroughput: {
ReadCapacityUnits: 100,
WriteCapacityUnits: 10
}
};
这是我尝试的查询
const params = {
TableName: "Journalist",
KeyConditionExpression: "begins_with(author, :t)",
ExpressionAttributeValues: {
":t": "Josefina"
}
};
我明白了:
失败{ValidationException:不支持查询密钥条件
我尝试了很多方法,我删除了表并使用其他属性创建,我创建了其他键并排序,我总是遇到类似的错误。