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

JOIN additional conditions indent #22

Open
esemlabel opened this issue Oct 8, 2020 · 0 comments
Open

JOIN additional conditions indent #22

esemlabel opened this issue Oct 8, 2020 · 0 comments

Comments

@esemlabel
Copy link

esemlabel commented Oct 8, 2020

It would be great to have option to auto indent additional condition inside JOINs.
For instance, going from this

SELECT
    *
FROM
    table1 t1
    JOIN table2 t2 ON t2.column2 = t1.column1
    AND td2.value2 > 2
    AND t2.condition2 = 'true'
WHERE
    t1.condition1 = 'false'
LIMIT
    10

to this

SELECT
    *
FROM
    table1 t1
    JOIN table2 t2 ON t2.column2 = t1.column1
        AND td2.value2 > 2
        AND t2.condition2 = 'true'
WHERE
    t1.condition1 = 'false'
LIMIT
    10

Also, it is good to control if JOINs should go on single line.
For instance, from this

JOIN table ON condition1
AND condition2
AND condition3

to this

JOIN table ON condition1 AND condition2 AND condition3
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

1 participant