in super-mode-calculator/src/lib/dynamo.ts [109:126]
function queryDateForSuperMode(
endDate: string,
endTimestamp: string,
stage: string,
docClient: AWS.DynamoDB.DocumentClient,
) {
return docClient
.query({
TableName: `super-mode-calculator-${stage.toUpperCase()}`,
IndexName: 'end',
KeyConditionExpression: 'endDate = :ed AND endTimestamp > :et ',
ExpressionAttributeValues: {
':ed': endDate,
':et': endTimestamp,
},
})
.promise();
}