我一直在尝试通过dynamo db的扫描来扫描两个日期之间的所有预订日期。每次测试时,它只会返回一个空数组。 这就是我的参数。
let params = {
TableName: process.env.RESERVATIONS_TABLE,
FilterExpression: "#berth = :berth and ((:startDate >= #startDate and :startDate <= #endDate) or (:endDate >= #startDate and :endDate <= #endDate) or (#startDate >= :startDate and #startDate <= :endDate) or (#endDate >= :startDate and #endDate <= :endDate))",
ExpressionAttributeNames: {
"#berth": "__berth",
"#startDate": "startDate",
"#endDate": "endDate"
},
ExpressionAttributeValues: {
":berth": id,
":startDate": startDate,
":endDate": endDate,
}
};
对我在做什么错有任何想法吗?