Hi Tom,
The settings you mention, such as .headers and .mode (along with a slew
of others) are usability settings contained in the Command-Line facility
(the CLI) offered by the makers of SQLite.
It is however by far not the only such interface, nor is it in any way
related to the data in the database file. You could use any other CLI
or GUI for sqlite which all sport their own settings - none of which
should be in the database file because it is not pertinent to other
users/uses of the DB file.
That's not to say you can't use and sqlite3 database file to house such
settings, even pass it around as an application file format (both of
which are often the case) but it is up to the calling entity (program)
to decide the meaning of its data, the database layer itself should
never be involved with that - it should be fully agnostic to the Data
and 100% transparent.
About the CLI - It's a very useful piece of toolkit, but it's intent is
more to be absolutely correct, well tested and provide a way to test
sqlite queries etc. in a controlled environment uncontaminated by
another user-program, GUI-layer or such.
For more usability, there are a few good options in the World from CLI's
to GUI's. I see you already know SQLite studio, some of my favourites
you might try are:
- DB Browser for SQLite: https://github.com/sqlitebrowser/sqlitebrowser
Powerful and Free SQLite GUI that runs very well on Linux, MacOS,
Windows and probably wherever else you fancy seeing the inside of an
SQLite file.
- SQLitespeed: https://sqlitespeed.com/
Made for user-rich and speedy features plus a nice tool to tell you if
your schema suffers from common mistakes made in SQLite - like
double-quoted strings, wrongful Type definitions, spelling mistakes etc.
It's only Windows exe though, but I've been told it runs perfectly fine
in WINE.
- SQLiteExpert: http://www.sqliteexpert.com/
Great Windows GUI with a visual query builder (which helps a lot if you
are not an expert yet at forming SQL queries) and the personal version
is free.
Both of these Windows ones come with the DLL available on the sqlite
downloads, BUT let's you roll your own and drop-in replace the DLL to
run in your dev environment with your specific sqlite build.
There are obviously more tools out there, but between these three and
the CLI we usually get our game on. We also typically use more than one
tool for their different strengths - which is another reminder why you
do not wish to have any specific tool's settings (or heaven forbid, all
of them) in your database file.
Good luck!
Ryan
On 2019/04/03 12:52 PM, Tom Browder wrote:
After coming back to SQLite from a long absence, I was surprised that
setting things like .mode and .headers in a database didn't stay that way
after exiting the file.
Then I remembered something about a resource file and found .sqliterc on an
internet search and that allowed the persistent settings I wanted.
However, would it not be more natural to keep those settings persistent
inside the db file?
Thanks,
-Tom
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users