[DB-SIG] mogrify/query for adodbapi

Vernon Cole vernondcole at gmail.com
Sun Feb 13 18:04:00 CET 2011


This sounds like a handy feature.  Recent releases of adodbapi allow the
programmer to specify the paramstyle she wishes to use. If she uses 'qmark'
(the default) her query is used unchanged. If she uses 'named' or 'format',
then her query is converted to 'qmark' before being used.
  The cursor stores an ADODB.Command structure as its .cmd attribute. The
(converted) query text is stored in the .cmd.CommandText attribute. There is
no storage of the original query, although it might be an optimization to
keep it around to avoid re-parsing.

Q) Should a reference to cursor.query return the original query text, or the
reformatted version?

Q) What is "mogrify"? Is that a reformatted version?
--
Vernon

On Sun, Feb 13, 2011 at 6:04 AM, William Dode <wilk at flibuste.net> wrote:

> Hi,
>
> With psycopg2 I use "mogrify" or the "query" attribute to retrieve the
> exact sql query. It's very usefull for debugging.
>
> Could it be possible to have the same with adodbapi ? I mean, is it
> possible with ado to retrieve the sql query ?
>
> How do you do with other databases ?
>
> bye
>
> thanks to read my bad english...
>
> --
> William Dodé - http://flibuste.net
> Informaticien Indépendant
>
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/db-sig/attachments/20110213/7ed150fe/attachment.html>


More information about the DB-SIG mailing list