4 ms·
Last few years I've been using a similar workflow with something like https://www.npmjs.com/package/pg-template-tag https://www.npmjs.com/package/pg-template-ta
by janpot 6y ago
Last few years I've been using a similar workflow with something like https://www.npmjs.com/package/pg-template-tag https://www.npmjs.com/package/pg-template-tag in combination with `pg`. I'm never going back to ORMs and query builders.
- hombre_fatal 6y agoThe template tag solution is cute but dangerous if you can accidentally leave off the `SQL` tag and the query still works. Ideally the system would require you to use the tag and prohibit a plain ol string.
- thedevelopnik 6y agoIt does require you to use the tag.
- hermanradtke 6y agoTypeScript compiler will error on this.
- smallnamespace 6y agoAny reason you chose that over node-sql-template-strings [1], which looks very similar? [1] https://github.com/felixfbecker/node-sql-template-strings https://github.com/felixfbecker/node-sql-template-strings