IBM / db2forzosdeveloperextension-about

IBM Db2 for z/OS Developer Extension for VS Code
https://IBM.github.io/db2forzosdeveloperextension-about/
Other
12 stars 7 forks source link

SQL formatting should have options to customize how the SQL is formatted #45

Open BrianL674 opened 3 years ago

BrianL674 commented 3 years ago

I really like the V1.2 new SQL formatting option for my ugly SQL. But, it has no controls or options.

And as we all know... SQL formatting can be very subjective. What I think is good looking SQL might not agree with your view of good looking SQL

for example, you put commas in front of the column name which I love. Some formatters and people like the comma at the end.... they are crazy.

Anyways, you should begin to add some SQL formatting options as a control to your formatter.

If you want help in deciding what to do do first then I can provide input suggestions. But for example, Having an optional control to enforce that the formatted SQL is 72 char wide (or less) might be important to some people! (the people who want to run the SQL in DSNTEP2 or DSNTIAUL) another control might be ...

(I know other SQL formatting tools have options or controls...)

realkendrickren commented 3 years ago

@BrianL674 Hi Brian, that is a good feedback, I totally agree with you that SQL formatting is always very subjective, different people have different preferences/styles that they are used to. We'll consider to introduce options/settings on formatting SQL in future. 72 characters per line is also a good one. Thanks again for letting us know.