var sql = require('sql')
var model = sql.define({
name: 'test',
columns: ['c1', 'c2']
})
console.log(model.insert([]).toQuery())
/*
This should throw an error as I am trying to insert nothing.
Clearly a mistake on the programmer's side
Instead, it fails silently:
-> { text: 'SELECT * FROM "test"', values: [] }
This means that the programmer won't be alerted to the mistake.
Because the query will not throw an error.
*/
This scenario should throw an error and alert the programmer. In any case, it should not turn into a select
This scenario should throw an error and alert the programmer. In any case, it should not turn into a
select