Closed elig0n closed 5 years ago
I'm not able to reproduce this locally. Do you have the exact create statement that you used?
Perhaps you can paste the output of .schema
from the sqlite3 cli.
@amjith Please try with this: https://pastebin.com/raw/Uyrs2hfA
I'm able to reproduce it. Thank you for your example. Trying to figure out the fix now.
@tsroten I found an interesting issue with cli_helpers that I'm not sure how to solve.
One of the preprocessors applied by tabulate_adapter is truncate_string.
But in this specific issue where the CREATE TABLE statement is mutli-line there result can often be longer than the 500 characters but it is broken up into multiple lines using \n
characters.
Ideally, I would want to override the default preprocessors for the tabulate adapter when I know that there is a reason to do so. But with the way the code is structured, I can specify additional preprocessors but I can't override the existing ones.
So I'm wondering what would be the best way to proceed?
@amjith I can definitely see a use case for disabling preprocessors in general. There is a way to disable the truncate_string
preprocessor, which is to pass max_field_width=None
as a keyword argument when you call format_output()
. Would that work?
I'll give that a shot. Thank you for the tip.
On Sun, May 26, 2019, 05:12 Thomas Roten notifications@github.com wrote:
@amjith https://github.com/amjith I can definitely see a use case for disabling preprocessors in general. There is a way to disable the truncate_string preprocessor, which is to pass max_field_width=None as a keyword argument when you call format_output(). Would that work?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dbcli/litecli/issues/58?email_source=notifications&email_token=AAAMA3DUBL6ESQ3Y6COIJ5TPXJ5BDA5CNFSM4HOHUYBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWIEO4Y#issuecomment-495994739, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAMA3C2J6XT3U75CM25PD3PXJ5BDANCNFSM4HOHUYBA .
This is now fixed in cli_helpers
and released. Please upgrade cli_helpers by running:
pip install -U cli_helpers
Under regular
sqlite3
.schema
command displays my database schema properly. But underlitecli
a multi-line CREATE TABLE is cut weirdly only after a few column description lines. No special character I detected at the cut point (I've checked with an hex editor). Each indented line is using only spaces.Example:
Tried with several \T options and with different
less
pager options andcat
.Queries are fine and everything else works alright though.