0

我正在尝试为我的 DynamoDB 查询编写参数。我收到一个错误,我相信它来自这个查询。

let params = {
    TableName: tableName,
    KeyConditionExpression:
      '(TimeId = :timeId AND begins_with ( TypeKey , :typeKey)) AND (awayTeam = :teamName OR homeTeam = :teamName)',
    ExpressionAttributeValues: {
      ':timeId': `${year}-${week}`,
      ':typeKey': 'GA',
      ':teamName': teamName,
    },
};

错误信息:Invalid operator used in KeyConditionExpression: OR

PK: TimeId
SK: TypeKey
attributes: awayTeam  |  homeTeam

有人可以让我知道我做错了什么吗?year、week 和 teamName 都定义为路径参数。

4

0 回答 0