[Zope-DB] Debug SQL queries

jwsacksteder at ramprecision.com jwsacksteder at ramprecision.com
Wed Sep 17 07:55:23 EDT 2003


I had the same problem with a Python Script. Here's what Dieter Maurer said:

> > I have found it extremely useful to consult the 'SQL used' area on
>the test
> > tab of ZSQL method when troubleshooting composed SQL statements. Is
>there
> > anyway to get the same information programmatically inside a Python
>script? 
>
>
>ZSQL Method's "__call__" has an "src__" parameter. When you
>pass a true value, the method returs the generated SQL source
>(without executing it).

Dieter rocks! This way you can see the SQL that is being generated as a
result of the python or dtml statement. 

I'm suspecting, though, that you want to have one dtml-sqltest statement
with both parameters and lose the dtml-and. 

-----Original Message-----
From: Andreas Tille [mailto:tillea at rki.de]
Sent: Wednesday, September 17, 2003 5:58 AM
To: Zope-DB at zope.org
Subject: [Zope-DB] Debug SQL queries


Hello,

I'm looking for a way to debug the queries which are sended to the
PostgreSQL
database by a ZSQL object.

I'm using a set of queries using

<dtml-sqlgroup where>
   <dtml-sqltest field1 type=nb optional>
<dtml-and>
   <dtml-sqltest field2 type=nb optional>
</dtml-sqlgroup>

and I wonder which parameters are given by the form I'm using, because
something goes obviousely wrong.

Thanks for enlighten me

         Andreas.


_______________________________________________
Zope-DB mailing list
Zope-DB at zope.org
http://mail.zope.org/mailman/listinfo/zope-db



More information about the Zope-DB mailing list