mtxr / SublimeText-SQLTools

SQLTools for Sublime Text 3
https://code.mteixeira.dev/SublimeText-SQLTools/
GNU General Public License v3.0
177 stars 40 forks source link

Colored output in output panel #161

Closed aditya43 closed 6 years ago

aditya43 commented 6 years ago

Issue Type

Feature Request | Bug/Error | Question

Description

Hello,

When I use CTRL+e, CTRL+d It shows me table description in a well formatted colored output :

colored_output

But, when I run a query DESCRIBE my_table It shows me table description in a plain text output format.

plain_text_output

Is it a bug or is there any workaround to get colored output when we execute queries?

Thank You

tkopets commented 6 years ago

This is not a bug, this output behavior is intentional.

ST: Describe Table and ST: Describe Function are using SQL syntax (if your main syntax is also SQL-related) because SQL is expected in the output, otherwise, we use Plain Text syntax to show all other output, because 90% of the case we don't expect valid SQL in the output but rather regular tabular data, applying SQL syntax to non-sql looks bad (think about unterminated string quotes and highlighting of random words in the output). We used to apply SQL to all output before and I know it looks not very attractive as I'm a heavy SQLTools user myself. Plain Text syntax performs much better for long output as well. See related discussion #84

aditya43 commented 6 years ago

Thanks