Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Tom Browder
On Wed, Apr 3, 2019 at 06:57 R Smith  wrote:
> Hi Tom,
...
> About the CLI - It's a very useful piece of toolkit, but it's intent is
...
> 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:
...

Thanks, Ryan, for a good set of references!

Best regards,

-Tom
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Tom Browder
On Wed, Apr 3, 2019 at 05:52 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.
>
...

Okay, I agree with all the excellent arguments about NOT keeping user
settings in the db file.

However, why shouldn't sqliterc be documented on the SQLite website since
the sqlite3 CLI is part of the whole suite?

Simply adding the contents of the current man page would suffice for that.

-Tom
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Tim Streater
On 03 Apr 2019, at 11:52, 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?

These settings are nothing to do with the database file. They're settings for 
the sqlite3 CLI program.



-- 
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread R Smith

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


Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Rob Willett

Tom,

Because the file is the database, your preferences for how things are 
displayed are just that, your preferences. Don't combine the two. If you 
have two users with different preferences, who wins?


We move the SQLite database around all the time, across different 
servers. We do not want the preferences for one to affect another 
server.


Rob

On 3 Apr 2019, at 11:52, 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


Re: [sqlite] Why no persistent user settings in a database file?

2019-04-03 Thread Tom Browder
On Wed, Apr 3, 2019 at 05:52 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.
>

I forgot that the sqliterc IS mentioned clearly in the sqlite3 man page on
Linux systems.

-Tom
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users