Closed theking2 closed 4 months ago
@nene are there any plans to reintroduce the tabulateAlias
option? it was very useful
Not really. The architecture of SQL Formatter makes it pretty much impossible to implement correctly.
It's also a formatting style that in general is problematic to apply automatically. It works for simple cases like this:
SELECT
customer.fname AS first_name,
customer.lname AS last_name,
customer.address AS address
FROM
customer;
But it quickly breaks down or gets silly when the code gets more complex, like:
SELECT
CONCAT(customer.title, ' ', customer.fname, ' ', customer.lname) AS full_name,
customer.address AS address
FROM
customer;
or perhaps like:
SELECT
CONCAT(
customer.title,
' ',
customer.fname,
' ',
customer.lname
) AS full_name,
customer.address AS address
FROM
customer;
With the latter also being a particularly tricky case of formatting to implement.
Input data
Which SQL and options did you provide as input?
Expected Output
Actual Output
Usage