Beautifier comment

tema

Member
Please, help!

By defaul Beautifier:

SQL:
select p.ab_field1, -- comment 1
       p.abc_field2, -- comment 2
       p.a_field3, -- comment 3
  from some_table t
 where t.field3 = 1

Desired Beautifier Behavior (align fields in a table and single-line comments):

SQL:
select p.ab_field1,  -- comment 1
       p.abc_field2, -- comment 2
       p.a_field3,   -- comment 3
  from some_table t
 where t.field3 = 1

How can I do that? Thanks!
 
Last edited:
I think there could be practical problems with implementing this, since select list items can be arbitrarily long. If one expression is 500 characters long, for example, should all comments align vertically with it?

Also, inline comments and comma placement is one scenario that code formatters can never handle imho. Change the beautifier settings to bullet-style commas (my preference) and watch this layout go horribly wrong.
 
Back
Top