question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User configuration file for sqlline

See original GitHub issue

Use case: Being able to override the defaults for sqlline parameters globally

i.e, If I want sqlline to behave like mysql, and not truncate records, I want to have a global way of setting maxwidth=100000 for all connections, which gets applied anytime I use sqlline.

I think that with SQLLINE-386 and #389 sqlline is actually very close to being able to do that.

One way to implement it would be

  • Define a default canonical connection config file location that is always read if present, unless overridden. (i.e $HOME/.sqlline/configuration)
  • Define a ‘global:’ or similar section in the connection config file, and use the properties defined there to to override the sqlline default settings (the connection-specific settings would be applied on top if it)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
joshelsercommented, May 18, 2021

Yep, ssh is a great example.

The use-case we had here is that SQLLINE-66 caused some grief down in Apache Phoenix. Phoenix does an (incorrect per the JDBC spec) thing around DATE/TIMESTAMP which has caused Phoenix users to expect time components on date columns. SQLLINE-66 had (per JDBC) correctly formatted DATE columns as just “yyyy-MM-dd” whereas Phoenix would have previously returned “yyyy-MM-dd HH:mm:ss”.

Now, they have a workaround via

!set dateFormat "yyyy-MM-dd HH:mm:ss"
!set timeFormat "yyyy-MM-dd HH:mm:ss"

However, the reporter (to Istvan and I) of this issue can’t get all of their users to change their code to set this first. Thus, if we had a way that could “default” any sqlline session to use these configurations, that would go a long way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLLine 1.12.0
SQLLine is a pure-Java console based utility for connecting to relational databases and executing SQL commands. It is similar to other command-line database ......
Read more >
Using SQLLine - SQLstream Documentation
Once connected to SQLstream or a database, you can use SQLLine in either of the following ... On all other platforms, the file...
Read more >
SQLLine 1.0.2
Introduction. SQLLine is a pure-Java console based utility for connecting to relational databases and executing SQL commands. · License and Terms of Use....
Read more >
SQLLine | GridGain Documentation
GridGain and Apache Ignite are shipped with the SQLLine tool – a console-based utility for connecting to relational databases and executing SQL commands....
Read more >
Cloudera Operational Database SQLLine access
You can use Maven to download the Phoenix client JAR files. If you only need the JAR files for SQLLine connection, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found