Menu

#1238 Format SQL puts all columns in SELECT statement on the one line in case of certain settings

Snapshot
closed-fixed
nobody
format SQL (1)
5
2016-07-20
2016-02-15
No

Hello,

I am evaluating "SQuirreL SQL Client snapshot-20160213_2231" and I found weird behaviour of formatting columns while using "Format SQL". When menu -> Global Preferences -> SQL formatting -> Preffered line length is set to let say 240 characters, then SQuirreL put all columns on one line. When the value is set to 80 or so, it works OK.

So the problem is, that SQuirreL in case of 240 values creates from

select
a as "ca",
b as "cb",
c as "cc"
from
t;

command like:

select
a as "ca",b as "cb",c as "cc"
from
t
;

I guess, this is not welcome behaviour, am I right? Could it be changed, please?

Thank You for understanding, Stepan

Discussion

  • Gerd Wagner

    Gerd Wagner - 2016-02-16

    This is the wanted behaviour.

    In fact for the example it is so that the select list is split when the prefered line length is set to 28 or smaller.

     
  • Andy Schönemann

    It would be great to add a seperate configuration option for that:

    [ ] put every column alone in line

    This is the most wanted option for me and a lot of my fellows. Every other sql formatter I know has this option too.

     
  • Gerd Wagner

    Gerd Wagner - 2016-07-19
    • status: open --> closed-fixed
     
  • Gerd Wagner

    Gerd Wagner - 2016-07-19

    The feature request Andy formulated is committed to our GIT repository and will be available in future snapshots and versions.

     
  • Andy Schönemann

    Great news! Thank you!

     

Log in to post a comment.