When Formatting, Place Short Queries on a Single Line
I would like the option to specify that queries under a certain number of characters be formatted to be on a single line. This would also apply to subqueries so that if they are over the specified limit it follows the formatting rules already in place for subqueries but places simple subqueries on a single line.
So
SELECT
*
FROM
TABLE
WHERE
COL1 = 5;
would become
SELECT * FROM TABLE WHERE COL1 = 5;
and
SELECT
COL1,
COL2,
COL3,
COL4,
CASE WHEN COL5 = 50 THEN 'A' ELSE 'B' END
FROM
TABLE
WHERE
COL1 IN (
SELECT
COLB
FROM
TABLE2);
becomes
SELECT
COL1,
COL2,
COL3,
COL4,
CASE WHEN COL5 = 50 THEN 'A' ELSE 'B' END
FROM
TABLE
WHERE
COL1 IN (SELECT COLB FROM TABLE2);
If the entire query, subqueries and all, fits into the specified number of characters it should also be placed on a single line so it wouldn't take statements like this -
SELECT Col1 FROM TABLE WHERE COL1 IN (SELECT COLA FROM TABLE2);
and split them up according to the formatting rules.