For debugging purposes, I want to see the SQL query knex
is executing. For example, I want to view SQL that knex
produces for this code:
knex('statistics')
.del()
.where({
'stats': 'reddit',
});
https://knexjs.org/guide/interfaces.html#other
knex('statistics')
.del()
.where({
'stats': 'reddit',
}).toSQL().toNative()