We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input data
Which SQL and options did you provide as input?
WITH a AS ( SELECT * FROM items ) (SELECT a.x FROM a) UNION (SELECT b.x FROM b);
Expected Output
WITH a AS ( SELECT * FROM items ) ( SELECT a.x FROM a ) UNION ( SELECT b.x FROM b );
Actual Output
Parenthesized SELECT a.x FROM a query follows directly after the CTE (and has an extra indent) instead of starting on position 0 of the next line.
SELECT a.x FROM a
Usage
The text was updated successfully, but these errors were encountered:
This is one of those bugs that is going to be near-impossible to fix with the current architecture of SQL Formatter.
Sorry, something went wrong.
Btw for anyone interested in giving an alternative to sql-formatter a try, prettier-plugin-sql-cst does this correctly:
sql-formatter
prettier-plugin-sql-cst
Input
Formatted
Demo: https://nene.github.io/prettier-sql-playground/
No branches or pull requests
Input data
Which SQL and options did you provide as input?
Expected Output
Actual Output
Parenthesized
SELECT a.x FROM a
query follows directly after the CTE (and has an extra indent) instead of starting on position 0 of the next line.Usage
The text was updated successfully, but these errors were encountered: