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

Make outputformat one line configurable #298

Closed
snuyanzin opened this issue May 17, 2019 · 3 comments
Closed

Make outputformat one line configurable #298

snuyanzin opened this issue May 17, 2019 · 3 comments

Comments

@snuyanzin
Copy link
Collaborator

snuyanzin commented May 17, 2019

Currently to setup csv outputformat it is required to specify up to 3 different properties, in case of table up to 2, e.g.

!set outputformat csv
!set csvDelimiter ###
!set csvQuoteCharacter !

or

!set outputformat table
!set maxColumnWidth 123

There is a bit more convenient way to use one line only like for instance sqlcl does.
In case of sqlline it could be

!outputformat csv ### !

which internally could be translated to

!set outputformat csv
!set csvDelimiter ###
!set csvQuoteCharacter !

As there is already existing command !outputformat which translates to !set outputformat the suggestion is to allow having several arguments for this command with translation to set to several properties

@julianhyde
Copy link
Owner

Seems like a good idea. Can you add some documentation?

If you specify 'outputformat csv' without the extra arguments, are the other properties set to their default values, or are they left as is?

@snuyanzin
Copy link
Collaborator Author

They will be left as is. To have them set with default values it's required to specify it explicitly like

!outputformat csv default default
# or if only one is required to be default
!outputformat csv default !
!outputformat csv ### default

Agree, I will also add some docs about it.

@julianhyde
Copy link
Owner

Fixed in d0ae1d1, PR #299. Thanks @snuyanzin!

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

Successfully merging a pull request may close this issue.

2 participants