Git Product home page Git Product logo

Comments (7)

amjith avatar amjith commented on May 24, 2024

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.

from litecli.

elig0n avatar elig0n commented on May 24, 2024

@amjith Please try with this: https://pastebin.com/raw/Uyrs2hfA

from litecli.

amjith avatar amjith commented on May 24, 2024

I'm able to reproduce it. Thank you for your example. Trying to figure out the fix now.

from litecli.

amjith avatar amjith commented on May 24, 2024

@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?

from litecli.

tsroten avatar tsroten commented on May 24, 2024

@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?

from litecli.

amjith avatar amjith commented on May 24, 2024

from litecli.

amjith avatar amjith commented on May 24, 2024

This is now fixed in cli_helpers and released. Please upgrade cli_helpers by running:

pip install -U cli_helpers

from litecli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.