Closed shaishab closed 7 years ago
Does your table have an auto-incremented primary key?
Promise-mysql shouldn't have any effect on this because the return data isn't changed from what mysqljs provides
not auto incremented but generated from server side
In which case it won't be returned because mysql has no idea what you're using as an ID.
This is not an issue with this library, mysqljs or mysqljs itself, it's intended behaviour.
After insert new row getting
insertId
always zerovar customer = yield pool.query(
queryTtext, queryValues);
then console.log(customer) and getting{ "fieldCount": 0, "affectedRows": 1, "insertId": 0, "serverStatus": 2, "warningCount": 0, "message": "", "protocol41": true, "changedRows": 0 }