[DB-SIG] paramstyles, again (and now voting)

M.-A. Lemburg mal at egenix.com
Thu Jun 21 17:17:34 CEST 2007


[Please calm down a bit.]

On 2007-06-21 16:14, Carl Karsten wrote:
> Carsten Haese wrote:
>>>>
>>>> * APIs aren't forced to abandon "legacy" parameter styles so existing code
>>>> written for existing APIs won't break.
>>>>
>>>> * No backwards compatibility wrapper is necessary.
>>> I do not see the last 2 points as a clear advantage, given the cost.
>> What cost? 
> 
> More code in the dbapi module.
> 
> More complex API.
> 
> More complex application code.
> 
> Application code that uses non portable paramstyles,

The whole point of the voting was to determine which paramstyles
people like most.

To that extent we've determined qmark and named to be the
paramstyles which won the vote. The vote makes a lot of sense:

* qmark is a SQL standard and widely used in the SQL CLI world.

* named is preferred by programmers who have to deal with
  lots of parameters.

Now, the purpose of DB-API 3.0 is not to break existing code,
only to make it possible to write new code in a more portable
way. By requiring support for at least qmark and named, we make
this possible.

Being explicit about the choice of paramstyle in the application
by setting it on the connection or cursor improves readability
of the code.

There's really no point in forcing breakage by insisting on
dropping support for any other styles.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 21 2007)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2007-07-09: EuroPython 2007, Vilnius, Lithuania            17 days to go

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611


More information about the DB-SIG mailing list