I have a NodeJS server that runs Express and SQLITE.
When I do:
const knexx = await knex('Users')
.where({id: user.id})
.update({ password: pwhashed }).toString()
console.log(knexx)
Somehow it prints:
update set
password
= '$2a$08$/qIkAQfaqzkwtXHyV.94S.YJ8OMx0e8nrySW6idCueZIT/f5rdU4K' whereid
= 1
The queries are missing table names. When I get rid of .toString, it gives me:
{ [Error: SQLITE_ERROR: near "set": syntax error] errno: 1, code: 'SQLITE_ERROR' }