Skip to content
New issue

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

SQL Formatter: comma-first option? #2

Open
edbrannin opened this issue May 28, 2020 · 1 comment
Open

SQL Formatter: comma-first option? #2

edbrannin opened this issue May 28, 2020 · 1 comment

Comments

@edbrannin
Copy link

  1. Which app are you using (JSON, XML, SQL):

SQL

  1. The steps to reproduce this issue:

Format the default SQL (maybe with more columns):

SELECT
	COUNT(price),
	price,
	something_else,
	more_columns
FROM
	orders
WHERE
	price < 70
GROUP BY
	price
,	something_else
,	more_columns
ORDER BY
	price

Desired result:

SELECT
	COUNT(price)
,	price
,	something_else
,	more_columns
FROM
	orders
WHERE
	price < 70
GROUP BY
	price
,	something_else
,	more_columns
ORDER BY
	price

Why? I like it because commenting out (non-first) columns gets a lot easier.

SELECT
	COUNT(price)
,	price
--,	something_else
--,	more_columns
FROM
	orders
WHERE
	price < 70
GROUP BY
	price
--,	something_else
--,	more_columns
ORDER BY
	price
@thien-do
Copy link

thien-do commented Jun 1, 2020

Thank you! This would be useful. We will support this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants