0
我是Dynamodb的新手, 我有表名是“用户”,其中有两列,一个是“时间”,另一个是“成本”。 我想根据列名得到排序后的数据, 说如果我提供输入参数为“时间”的前50个记录按递增顺序,并且如果我提供输入参数为“成本”,那么前50个记录。如何根据动态列从dynamodb获取排序数据
我试过这样的事情,但这不起作用。
{
TableName: "User",
Limit: 50,
ScanIndexForward: false,
ExclusiveStartKey: (params.lastEvaluatedKey)? {tripId: {S: String(params.lastEvaluatedKey)}}: null,
KeyConditionExpression : 'cost > :costValue',
ExpressionAttributeValues : {
':costValue': '1'
}
}
谢谢先进。