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

[Formatter] Configurable option for inline statement length. #611

Open
adamrybak opened this issue Jun 8, 2020 · 3 comments
Open

[Formatter] Configurable option for inline statement length. #611

adamrybak opened this issue Jun 8, 2020 · 3 comments
Labels
feature request New issue opened using "Feature request" template formatting

Comments

@adamrybak
Copy link

I would like to be able to configure the length of an inline statement before it is split across several lines.
For a query which has a very short subquery, it is much easier to read when it is just on one line.

Current Formatting:

select field0,
    (
        select column3
        from table2
        where column2 = 'qwe'
    ) as field1,
    (
        select column1
        from tableG
    ) as field2,
    (
        select column2
        from tableH
    ) as field3
from table1

Requested Feature:
Example: maxInlineLength: 160

select field0,
    (select column3 from table2 where column2 = 'qwe') as field1,
    (select column1 from tableG) as field2,
    (select column2 from tableH) as field3
from table1
@adamrybak adamrybak added the feature request New issue opened using "Feature request" template label Jun 8, 2020
@nickleeh
Copy link

This would make format more flexable and code more readable. DataGrip has option to set wrap lengh like this too.

@realjanpaulus
Copy link

Is there any update on this, i.e. are there plans to implement this?

@gjsjohnmurray
Copy link
Collaborator

No current plans, but if someone wants to have a go at implementing this then we'll look at the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template formatting
Projects
None yet
Development

No branches or pull requests

4 participants