Hacker News new | ask | show | jobs
by wodenokoto 637 days ago
Everybody is up in arms about the comma suggestion but everyone thinks the 1=1 is a good idea in the where clause? If I saw that in a code review I don’t know what I’d think of the author.
1 comments

You can motivate it with the same reasons as trailing commas. Making code reviews easier since changes to WHERE statements does not effect other lines. But if the reason is, as in this case to be able to add dynamic conditions. You will for sure be fired where I work.