Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using `WHERE 1=1` is such a common pattern that I seriously doubt it's realistically increasing "cognitive load".

I've seen it used in dozens of places, in particular places that programmatically generate the AND parts of queries. I wasn't really that confused the first time I saw it and I was never confused any time after that.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: