📜  即使 dynamodb 中不存在数据,更新仍在运行 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:55.061000             🧑  作者: Mango

代码示例2
var params = {
    TableName: 'users',
    Key: {
        'userId': '123'
    },
    UpdateExpression: 'SET isActive = :isActiveVal',
    ConditionExpression: 'userId = :userIdVal and isActive <> :isActiveVal',
    ExpressionAttributeValues: {
        ':userIdVal': '123',
        ':isActiveVal': 'false'
    },
    ReturnValues: "ALL_NEW"
};