[DB-SIG] [SQLObject] Re: SQLite connection - relative filename
Ian Bicking
ianb at colorstudy.com
Sat Apr 2 00:37:44 CEST 2005
Clark, Chris M wrote:
>>def uri_parse(uri):
>> module_name = uri.split(':', 1)
>
> .....
>
>
> My 2 cents: for parsing the URI I like semi-colons ';' as separators, it
> is a little ODBC like but it has less collisions than colons do.
This particular colon is for indicating the database type, like
mysql:..., or pgsql:... -- it's what makes something a URI (instead of a
DSN... though I'm even sure what DSN stands for). After that it's
potentially entirely up to the database driver, though of course some
uniformity is nice. Typical DSNs, from what I can tell, are parsed in
an up-front manner into a set of keys and values; though maybe they
sometimes include a prefix indicating database type...? Java has
database URIs too, don't they? But they are all like jdbc:..., correct?
Of course, following that pattern you could get
dbapi:jdbc:postgresql://... which feels awfully weird to me.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the DB-SIG
mailing list