[orm-devel] Unified Connection Strings
Diedrich Vorberg
orm-devel@mailman.tux4web.de
Sun, 1 Dec 2002 13:04:34 +0100
A good day to everyone :-)
I'll have to make a design decision regarding orm and I'd like to
hear your opinions on this:
Writing the test programs I would have liked to add the ablility to
pass connections parameters as a single string on the command line.
Here I used -u -d -p parameters to get around this. Now I'm writing a
ORMDatasourcePool Product for Zope and ran into the same problem: how
to specify database connection parameters in a unified way.
There are two approaches I'm considering (any more ideas very
welcome): PostgreSQL's DSN syntax:
dsn = "adapter=pgsql dbname=test user=diedrich password=secret"
or the JDBC style urls
url = "pgsql://diedrich:secret@localhost/test"
Personally I like Postgres' way of doing things better: easier to
read, easier to parse and all in all very practical. The url style's
advantages are: they are used by one of the most popular database
access infrastructure and they fit into a single string on the command
line.
Does anyone know who else is using this url style notation? Is there
a standard like an RFC or so? Do you think it's worth the effort to
support both?
Any comment is very welcome!
Diedrich
--
_..._ Diedrich Vorberg
.' '.
/ _ _ \ http://www.tux4web.de
| (o)_(o) | info@tux4web.de
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/
'---` `---`