3 ms·
I tend to agree. Query builders are a "cool" solution looking for a problem. That said, dynamic query building example looks way better in knex than in slonik.
by hbrn 4y ago
I tend to agree. Query builders are a "cool" solution looking for a problem.
That said, dynamic query building example looks way better in knex than in slonik. Proposed approach has it's benefits, but the code is much harder to read. And it gets exponentially worse with more complicated queries.
The caveat, however, is that dynamic queries themselves are almost an anti-pattern, and should be avoided when possible.