Comments (9)
I was about to file an identical issue before I found this one. This would be a useful feature for me as well. Adding my +1!
from litecli.
@fdietze The default behavior of litecli seems to match most of the things in your sqliterc file.
The default table format already has headers on.
The null value is already represented as <null>
.
The number of affected row are always printed (.changes on)
The timing information is also on by default (.timer on)
The goal with litecli is to ship with sane defaults so people aren't spending a lot of time trying to mess with configuration files to get reasonable behavior.
That said I can see that people might still want this feature. I'm happy to help someone get started if they're interested in contributing this feature.
from litecli.
I have started implemented this now. If people don't mind that it might be a bit below the standard of the rest of the codebase I will submit a pull request (I will ofc do my best). If nothing else it can serve as a starting point. Thinking that it can take in startup commands specified in the config file. Will first focus on implementing the core functionality, then add some basic error handling (which I am sure can be expanded). Already have a minimal running example. @fdietze @amjith @aborruso
from litecli.
I think you can store your commands in a file and then pass them as command line argument to litecli
.
from litecli.
Hi @elig0n and how to run at start in example .load /usr/lib/sqlite3/pcre.so
?
It would be nice if litecli read .sqliterc standard file.
Thank you
from litecli.
@aborruso that's a good idea. For now, I think you can use the favorite query to store a set of commands, and run it with a short name.
from litecli.
Just found this issue, this is the first thing I was looking for in the configuration. 👍
I have a nice .sqliterc
with features i'd like to keep using:
.mode column
.headers on
.nullvalue <null>
-- always explain query plan
.eqp on
pragma foreign_keys = ON;
.print "Databases:"
.databases
.print "\nTables:"
.tables
.print "\n"
.changes on
.timer on
from litecli.
The goal with litecli is to ship with sane defaults so people aren't spending a lot of time trying to mess with configuration files to get reasonable behavior.
That's what I like about it! Thank you for your work!
from litecli.
Came here to open this issue. It would be great to auto set foreign keys as well as display the tables of the db.
from litecli.
Related Issues (20)
- No such function: REGEXP
- Support `.eqp` like in sqlite3 HOT 3
- Can't use .once more than once. HOT 1
- When using .once -o, only last line remains HOT 2
- .schema: line breaks and missing index information
- “python_requires” should be set with “>=3.6”, as litecli 1.9.0 is not compatible with all Python versions
- feature request: sqlite3.38+ support for json to use its new features HOT 1
- Test failure with sqlparse==0.4.3
- Header names vague or hidden in grid mode HOT 2
- when insert to `table t(t text)` , raise an exception
- When long wide characters are stored in the database, it will not output some rows if enabled auto_vertical_output HOT 1
- STRICT tables seem to not be supported HOT 1
- FR: configuration to import custom python functions
- Feature comparison with SQLite CLI special commands (dot commands) HOT 1
- FR: support environment variables in (favourite) queries
- Cancelling a query leads to an error message, there is no 'KILL' command in sqlite HOT 1
- syntax style changes output behaviour HOT 1
- <null> entries in .schema output
- Litecli crashes in non root containerized environment without home directory HOT 7
- default prompt broken with very long filename?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litecli.