Database "filename" format

Geert Janssens janssens-geert at telenet.be
Mon Feb 22 11:40:30 EST 2010


Hi,

I'm about to make some changes in the code that will normalize file and 
database names. Internally, they will all be converted to either one of these 
internally:
file://<path>
xml://<path>
sqlite3://<path>
mysql://<user>:<pass>@<host>:<port>/<dbname>
postgres://<user>:<pass>@<host>:<port>/<dbname>

Whenever the user is to be shown a such a name, they will be transformed into
<path> (for file based data stores, in error messages eg during open and save)
<filename-only> (all other places, like history, title bar,...)
mysql://<user>@<host>:<port>/<dbname> (ie hide the password)
postgres://<user>@<host>:<port>/<dbname> (ie hide the password)

Why:
1. consistent internal representation, which will make a number of evaluations 
with the uri's more straighforward
2. more consistent user presentation. The file representation doesn't change. 
This is what the user already sees in his file manager. The uri form 
acc://user:pass@host:port/path on the other hand is common in other remote 
access scenarios, like the web, ftp, ssh,...
3. Passwords shouldn't be user visible. There may be situations where gnucash 
is used that require some password privacy. It's still stored in gconf though. 
It would be better to store it in gnome-keyring, but that's another issue 
(which I have just added in bugzilla, by the way: 
https://bugzilla.gnome.org/show_bug.cgi?id=610706)

Any comments ?

Geert


More information about the gnucash-devel mailing list