3 ms·
The advantage here is language integration. You can write a query, wrap it in an object, add clauses to it dynamically, combine it with another query using some
by siddboots 13y ago
The advantage here is language integration. You can write a query, wrap it in an object, add clauses to it dynamically, combine it with another query using some clever logic, and so on.
- ygra 13y agoThat's probably the only place where I would use it, when I have to construct a query on the fly based on various conditions. For a plain static query I think the regular SQL is much easier to read and understand (let alone paste into a query window to test its output).
- siddboots 13y agoBuilding queries dynamically is the intended use case. This wasn't designed as a replacement for plain SQL.