Skip to content

SQL Formatter: comma-first option? #2

Description

@edbrannin
  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions