[Zope-DB] How to call a zsql method with NOT a parameter

Dieter Maurer dieter at handshake.de
Thu Jan 27 13:56:55 EST 2005


Axel Straschil wrote at 2005-1-26 20:07 +0000:
>I have zsql my_zsql like
><params>
>	departureid
>	langid
>	visible
></params>
...
> ...
>If i call it from python with my_zsql(langid=mylangid), zope takes
>departureid somwehre from the request and is rendering the where part
>with departureid.

In fact, it acquires it.

Unfortunately, there is no way to suppress acquisition (unless
you are ready to pass in an argument explicitely).

Looking at the code ".../Shared/DC/ZRDB/sqltest.py" it appears
as if you could pass "''" (the empty string) to mean
(no value provided) for all optional "sqltest" variables with
a type different from "string".

-- 
Dieter


More information about the Zope-DB mailing list