如何使用 sequelize 检查记录是否已更新

how to check that record updated or not using sequelize

在这段代码中我更新了一个模型的记录 IPAdress.

现在如何查看记录是否已更新

let IPAdress = await model.IPAdress.update(data,{ where: { id } });
if index 0 of an array is 0 then it mean that record has not updtaed yet.
let IPAdress = await model.IPAdress.update(data,{ where: { id } });
if(IPAdress[0] == 0) throw "Error Message";
else { print("record has been updated ");