sebasmonia / pyquebec

A Python package to create quick SQL queries from the console.
https://github.com/sebasmonia/pyquebec/wiki
MIT License
1 stars 0 forks source link

Console printer breaks if too many columns are returned #3

Closed sebasmonia closed 9 years ago

sebasmonia commented 9 years ago

Partially fixed in commit 4a2bddae69352e11cbceec5163e2d2b866d39141. Columns to fit on the screen are counted only based on the max width set in the configuration. Means that if all the columns are just a few chars in length the printer will not show additional columns.

sebasmonia commented 9 years ago

There's a better fix in the pipeline but it's pretty slow (goes over all the rows to get the max width for each column and tries to fit as many as possible).

Tempted to keep this fix since, realistically, no one is going to print 100000 rows to the console. And getting garbled text is SUPER annoying.

sebasmonia commented 9 years ago

Slow solution in place.