[DB-SIG] URI syntax for databases
M.-A. Lemburg
mal at egenix.com
Thu Mar 31 10:22:29 CEST 2005
Ian Bicking wrote:
> M.-A. Lemburg wrote:
>
>> What we could add an optional keyword argument uri="..." which
>> database could then interpret according to your suggestion.
>
>
> I suppose that would be fine -- I thought it would be easier to
> implement it on top of connect instead of as an extension to that function.
>
>> This would be backwards compatible with the existing DB API.
>
>
> It's not incompatible if we add an entirely separate function, like
> uri_connect (or connect_uri or whatever). I don't want to mess with
> stuff that's already there, just add something new.
>
>> However, I don't see why the scheme name should be the name
>> of the database module... I'd opt for "dbapi2:" as scheme -
>> after all, that's what the protocol scheme is all about ;-)
>
>
> Well, we have to start by finding the correct module to get the connect
> (or connect_uri or whatever) function from. The most obvious way is to
> use the scheme as the module lookup, and let the module's function do
> the rest of the parsing. The resulting URIs look fairly URI-ish as well.
Yes, but I thought you wanted a change to the DB API spec which
specifies the interface for the modules themselves, not an
abstraction ?!
In the end, I think it's more efficient to implement such
a function in an abstraction layer which is maintained
independently from the DB-API database modules. Otherwise,
you'd have to wait for all modules to implement the change
and that can take a few years.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Mar 31 2005)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the DB-SIG
mailing list