Hi,
there is one feature that I really would like to be implemented when using the code formatter in Aqua Data Studio.
When using the code formatter I use the option to add a line break before a comma. I like this e.g. for formatting my SELECT lists. However, when I have a list in my code, e.g. "(1, 2, 3, 4, 5)" this will put each number 1 to 5 in a separate line.
I would like to keep this list of numbers in one line of code. I often use lists with several thousand entries, and this results in 99% of the code consisting of list items and 1% of other SQL code.
In order to have a better overview when using large lists I would like to (be able to optionally) disable the line break option for commata for these kind of lists (comma separated enumerations).
It would be even better if within such a list would be re-formatted such that it contains no line breaks and only one whitespace (one blank) after each comma.
There could be one new option named something like "Put lists in one line".
Thank you for your feedback on this, and hopefully for its implementation :-)
Rainer
Hi Rainer,
To clarify your request, would you be able to supply an actual example of the formatting that you are looking for?
Thanks, Tom
Hi Tom,
thank you for your message.
Here is an example of the formatting I am looking for.
SELECT
A
, B
FROM
MYTABLE
WHERE
A IN (1, 2, 3, 4, 5) AND
B BETWEEN 50 AND 60
The options for creating this format would be adding a line break
before comma
after logical operators and
SQL Keywords ( I hope my tranlation from german to english is correct here).
Note that there is no line break after the "AND" following the "BETWEEN", which I find appealing. I did not write this in my original request as it only introduces one extra line. But if you have a look at the formatter anyway, perhaps it is not much effort to include that as well. Otherwise just ignore it...
Best regards,
Rainer
Hi Tom,
thank you for your message.
Here is an example of the formatting I am looking for.
SELECT
A
, B
FROM
MYTABLE
WHERE
A IN (1, 2, 3, 4, 5) AND
B BETWEEN 50 AND 60
The options for creating this format would be adding a line break
before comma
after logical operators and
SQL Keywords ( I hope my tranlation from german to english is correct here).
Note that there is no line break after the "AND" following the "BETWEEN", which I find appealing. I did not write this in my original request as it only introduces one extra line. But if you have a look at the formatter anyway, perhaps it is not much effort to include that as well. Otherwise just ignore it...
Best regards,
Rainer
Seems like we can format the sample statement close to what the user suggested with the following options checked:
This results in the following format:
SELECT A , B FROM MYTABLE WHERE A IN (1 , 2 , 3 , 4 , 5) AND B BETWEEN 50 AND 60
We could probably add an option "Ignore IN (...)" in the Line Break section of the Beautify Option dialog to keep the "A IN (1, 2, 3, 4, 5) AND" on 1 line, and add the logic to keep the "B BETWEEN 50 AND 60" on 1 line.
Seems like we can format the sample statement close to what the user suggested with the following options checked:
This results in the following format:
SELECT A , B FROM MYTABLE WHERE A IN (1 , 2 , 3 , 4 , 5) AND B BETWEEN 50 AND 60
We could probably add an option "Ignore IN (...)" in the Line Break section of the Beautify Option dialog to keep the "A IN (1, 2, 3, 4, 5) AND" on 1 line, and add the logic to keep the "B BETWEEN 50 AND 60" on 1 line.
Issue #15511 |
New |
Completion |
No due date |
No fixed build |
No time estimate |
Hi Rainer,
To clarify your request, would you be able to supply an actual example of the formatting that you are looking for?
Thanks, Tom