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

Optionally emit a more compact representation of lists #1

Closed
lelit opened this issue Aug 9, 2017 · 1 comment
Closed

Optionally emit a more compact representation of lists #1

lelit opened this issue Aug 9, 2017 · 1 comment

Comments

@lelit
Copy link
Owner

@lelit lelit commented Aug 9, 2017

Currently the IndentedStream emit lists of values/nodes as standalone items, that is one per line:

SELECT a
     , b
     , c
FROM function(1
            , 2
            , 3)

It would be nice to set a threshold, a maximum width, and make it emits those items on a single row, when the resulting width is below that value, so the above would result in the following, given a threshold of 20:

SELECT a, b, c
FROM function(1
            , 2
            , 3)
lelit added a commit that referenced this issue Aug 10, 2017
Giving the option compact_lists_margin, the IndentedStream tries to print lists on a single
row, when their printed length does not exceed the specified value.

This implements issue #1.
@lelit

This comment has been minimized.

@lelit lelit closed this Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.