[DB-SIG] API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)
Daniele Varrazzo
daniele.varrazzo at gmail.com
Fri May 17 18:36:35 CEST 2013
On Fri, May 17, 2013 at 5:23 PM, Michael Bayer <mike_mp at zzzcomputing.com> wrote:
>
> the proposal includes that only qmark and named are available. There would be no pyformat, format, numeric.
What you said before doesn't seem the same:
On Fri, May 17, 2013 at 2:59 PM, Michael Bayer <mike_mp at zzzcomputing.com> wrote:
> there's no reason a DBAPI can't keep a particular paramstyle, we just want to make it so that *all* DBAPIs definitely support "named" and "qmark". The rest are just optional.
You seem suggesting psycopg MUST offer qmark and MAY (at its own
discretion) offer pyformat. No: leaving this choice open is insanely
bad. If dbapi wants to take a position it should mandate one format
with a carefully specified syntax and reject any other formats.
If a driver wanted to implement support for a different placeholder
syntax (e.g. for query pass-through) it must be do such outside the
dbapi realm and tools like SQLAlchemy can be implemented using the
DBAPI part only, without resorting to driver-specific dialects.
-- Daniele
More information about the DB-SIG
mailing list