Re: API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)

Daniele Varrazzo <[email protected]>
Newsgroups gmane.comp.python.db
Message-ID <CA+mi_8ZHTRHdiQYjZ8JYU-rzM6ONUti8MrLxvb9vRkWExLHk0g@mail.gmail.com>
On Fri, May 17, 2013 at 5:23 PM, Michael Bayer <[email protected]> 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 <[email protected]> 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
_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.