3 ms·
> As an example why would WHERE clauses need to have a AND instead of multiple WHERE clauses. Haskell's esqueleto SQL eDSL actually enables just this BUT acti
by whateveracct 4y ago
> As an example why would WHERE clauses need to have a AND instead of multiple WHERE clauses.
Haskell's esqueleto SQL eDSL actually enables just this
BUT acting like this is a big deal is Wadler's Law for sure.
- phplovesong 4y agoSure, multiple ORMs and query builders allow this, but when writing pure SQL thats dynamic its annoying to have to check for some condition before knowing "Should i use WHERE or AND next". This is traditionally solved with an hard coded WHERE 1 = 1 in the beginning of the query. Still its a wart, even tho a small one. Point being, there are many other small things like this that (can) make SQL a burden, eg the select all but <n+1> columns.