Last few years I've been using a similar workflow with something like https://www.npmjs.com/package/pg-template-tag in combination with `pg`. I'm never going back to ORMs and query builders.
[1] https://github.com/felixfbecker/node-sql-template-strings
Ideally the system would require you to use the tag and prohibit a plain ol string.