var post = {id: 1, title: 'Hello MySQL'};
var query = connection.query('INSERT INTO posts SET ?', post, function (error, results, fields) {
if (error) throw error;
// Neat!
});
console.log(query.sql); // INSERT INTO posts SET `id` = 1, `title` = 'Hello MySQL'
so query.sql returns the actual sql executed. However when promise-mysql is dropped in then query.sql returns undefined.
can query.sql match the mysql functionality? To know the sql executed is really helpful when troubleshooting
in the mysql docs on npm the example is given:
so query.sql returns the actual sql executed. However when promise-mysql is dropped in then query.sql returns undefined.
can query.sql match the mysql functionality? To know the sql executed is really helpful when troubleshooting