[DB-SIG] API suggestion: expose 'quote' method

Harald Meland Harald.Meland at usit.uio.no
Tue Jun 3 22:08:18 EDT 2003

[Chris Cogdon]

> I would suspect that these DMBSes still have a way of representing any
> literal value inside the SQL string itself. For example:
> cur.execute ( "select * from employee where name like ? and
> type='manager'", name_criteria )

Spot on.  Exposing such a quoting mechanism in the standard API does
*not* imply that binding should go away/be deprecated/whatever.

As I see it, there's not much benefit in having various driver modules
expose such quoting mechanisms in their own way; the benefit lies in
exposing the mechanism in the same manner across all the driver
modules.  Hence, definition of how this mechanism should be exposed
should go into (the next version of) the DB-API -- as a strong
requirement for compliance.

> I'm suggesting that we make this part of the API (2.1, perhaps) so
> that there's something there my application can depend on. I believe
> it's an important part of dealing with the DMBS, and should be part of
> the specs/requirements.


More information about the DB-SIG mailing list