[Zope] Viewing SQL code being run
Dieter Maurer
dieter@handshake.de
Sun, 30 Jun 2002 23:38:01 +0200
Ed Leafe writes:
> I'm learning to use sqlgroup to eliminate a lot of nearly identical
> queries, and so far have been happy with the results. But every so often
> I get a result that doesn't jibe with what should be returned, and I'm
> having a hard time figuring out where my mistake is.
>
> Is there any way to view the actual SQL that gets sent to the
> server after all the sqlgroup and sqltest tags are evaluated? That would
> be a really big help in debugging complex expressions.
Someone else already told you about the "Test" tab of ZSQL methods.
In cases, this is not feasible, you can call a ZSQL method with
an "src__=1" keyword parameter. In this case, it will just generate
the SQL command and return it. It will not send the generated SQL
to the database.
Dieter