3 ms·
I agree with that sentiment. Concatenating strings is miserable and error-prone, especially for highly dynamic queries. But there's still another step between
by frosted-flakes 8y ago
I agree with that sentiment. Concatenating strings is miserable and error-prone, especially for highly dynamic queries.
But there's still another step between a full-blown ORM and a query builder, where you still define the models and the relations between them, but fall back to a plain query builder for constructing queries. That way, you're not dealing with plain arrays, etc., but you're still essentially writing SQL. Like Objection.js[0], which is built on Knex.
[0] https://vincit.github.io/objection.js/ https://vincit.github.io/objection.js/
- simplify 8y agoWhat's wrong with working with plain arrays? Genuine question, they seem to work fine for me so far.