Skip to content

Comment on Show HN: SQL Formatter

Comments

The example here is misformatted:

  frozen_rand BETWEEN % (rand_low) s
  AND % (rand_high) s
Should all be on one line, those aren't two different conditions.

I guess it's newlining on certain key words like AND which is ok if it's a new where condition but unnecessary if it's part of an between clause.

Shall we even discuss the weird SQL injection stuff there, with what looks like Python string formatting? Use bind parameters, people!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.