loopbackio / loopback-connector-db2

LoopBack Connector for IBM DB/2
Other
17 stars 15 forks source link

fix: catch error properly for deleteall #148

Closed jannyHou closed 4 years ago

jannyHou commented 4 years ago

Moved the description here:

When the SQL returnes a warning, there is a non-null err and the info is an empty array so info[o].affectedRows blows up

This PR is created to fix ^

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

agnes512 commented 4 years ago

I found other operations use cb(err, {count: Number.parseInt(info[0].affectedRows, 10)}); too. Maybe we can fix them as well?

jannyHou commented 4 years ago

@agnes512 Sure 👍 updated as well.