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

Axel Straschil axel at straschil.com
Mon Jan 31 05:57:33 EST 2005


Hello!

>>I realy was expeciting my_zsql() to behave like my_dtml_method()
> Unfortunately, this expectation is wrong.
> Z SQL Methods have a signature different from DTML Objects.

Full ACK ;-)

>   *  apparently, you too, belong to the people that do not
>      read my responses casefully.
>      I told you how to work around the problem; didn't I?
>      To repeat it:
>        pass "''" (empty strings) for arguments you want
>        not to be acquired and ignored by "dtml-sqltest ... optional".
>        This should work for all types different from "string".

I'll give that anoher testing. I thought I was trying this with '' and
None, and got for both an 'Can't render that to int' error, but maybe I
forgott the optional, I'll figure out.

Maybe, ZSQL is not the best joice for me, when I've got to say the
method what not to do, I'm afraid to forget something ... also I can't
add another parameter later without changing all calls to the method.

Otherwise, the behavior of ZSQL can be strong, so, I shout not use ZSQL
or change the way of using it.


>
>      If you do not read my messages, I will start not to read
>      your questions ;-)

Upps, have to say that im realy love your postings, maybe was a little
headless the last two day, finishing a bigger project ..., sorry for
that. 

>   *  It is very easy to define your own variant of
>      Z SQL Methods (using inheritance) -- with a behaviour
>      you like.
>      Look at "CCSQLMethods" for an example.

Just had a look, also to ZSQL, thing I'll take some time for me to
understand how the querys are bild ...

Lg,
AXEL.



More information about the Zope-DB mailing list