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

Add Option: reindent_aligned #63

Open
Jonnokc opened this issue Jun 2, 2020 · 1 comment
Open

Add Option: reindent_aligned #63

Jonnokc opened this issue Jun 2, 2020 · 1 comment

Comments

@Jonnokc
Copy link

Jonnokc commented Jun 2, 2020

Option Details
Name: reindent_aligned

If this is a new option, please fill out the below
Type (boolean, multi-select, number, etc): boolean
Values (if applicable):

If this is to update an existing option, please describe what should be updated

Additional context
In some cases the traditional reindent option does not properly format insert queries. The reindent_aligned flag must be used in it's place.

-- existing reindent flag example
-- formatting doesn't process as traditionally expected, all columns are collapsed
INSERT INTO SCHEMA1.TABLE_1
  (SELECT CURRENT_DATE AS CREATED_AT, COLUMN_1 AS TEST2, NOW() AS CURRENT_TIME, COLUMN_3 AS TEST3, COLUMN_4 AS TEST4, COLUMN_5 AS TEST5, COLUMN_5 AS TEST5, COLUMN_5 AS TEST5, COLUMN_5 AS TEST5
   FROM SCHEMA1.TABLE_2);
-- and example when reindent_aligned is used. column alignment remains in their new lines
INSERT INTO SCHEMA1.TABLE_1 (
        SELECT CURRENT_DATE AS CREATED_AT,
               COLUMN_1 AS TEST2,
               NOW() AS CURRENT_TIME,
               COLUMN_3 AS TEST3,
               COLUMN_4 AS TEST4,
               COLUMN_5 AS TEST5,
               COLUMN_5 AS TEST5,
               COLUMN_5 AS TEST5,
               COLUMN_5 AS TEST5
          FROM SCHEMA1.TABLE_2
       );
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

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

No branches or pull requests

1 participant