在这段代码中,我更新了一个模型的记录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 ");