[Zope] ZSQL method advanced tab

Dieter Maurer dieter at handshake.de
Sat May 8 14:15:24 EDT 2004


patrick sullivan wrote at 2004-5-7 13:55 -0700:
>Was futzing with the limit field in the advanced tab of a zsql method
>and noticed something i had never seen before.  It was to have a zsql
>method return a python class instead of a result set.  It said i could
>put a class into the $ZOPEHOME/Extensions dir and the method would
>return that object.
>
>I don't have any memory of it being discussed here.  Has anyone used
>this with good/bad results?

We used it (with my former employer) with good results.
It works as documented :-)

*BUT*, your class cannot add new instance attributes.
This is because the class underlying rows in database query
results do not have a "__dict__".

-- 
Dieter



More information about the Zope mailing list