[orm-devel] Unified Connection Strings
Ross J. Reedstrom
orm-devel@mailman.tux4web.de
Sun, 1 Dec 2002 22:09:35 -0600
On Sun, Dec 01, 2002 at 01:04:34PM +0100, Diedrich Vorberg wrote:
> 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.
Hmm, what is a ORMDatasourcePool Product? I was just looking at what it
would take use orm from inside other Zope products, using a Zope SQL DA
as the datasource. Is that anything like what you're up to, or something
even more integrated?
> 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"
I'm partial to the first: it seems more pythonic, as well.
Ross