[Zope-DB] CCSQLMethods
Maciej Wi¶niowski
maciej.wisniowski@euro.coig.pl
Thu, 13 Feb 2003 15:59:45 +0100
Hi
I'm using Dieter Maurer's 'CCSQLMethods':
http://www.dieter.handshake.de/pyprojects/zope/CCSQLMethod.html It works
really good, but I don't know how to use FlushCacheEntry Method. My
CCSQLMethod has a lot of
parameters defined like this:
Method:
srch_KOM_v_PropozycjeCC
Parmeters:
"ord=Nazwa sortType=asc idPro srch_IdKRe=% srch_IdKReS=% srch_NrKRe=%
srch_Numer=% srch_Nazwa=%
srch_Skrot=% srch_NIP=% srch_Regon=% srch_Adres=% srch_Stan=% srch_VAT=%
srch_Cecha=%
srch_Status:tokens=% srch_IdSplk=%"
Part of method's body:
select * from KOM_v_Propozycje
<dtml-sqlgroup where>
<dtml-sqltest idPro column="idPro" op=eq type=int optional>
<dtml-and>
<dtml-sqltest srch_Nazwa column="Nazwa" op=like type=string>
<dtml-and>
<dtml-sqltest srch_Status column="Status" op=like type=string
multiple>
<dtml-and>
<dtml-sqltest srch_Stan column="Stan" op=like type=string>
<dtml-and>
<dtml-sqltest srch_NIP column="NIPDigits" op=like type=string>
<dtml-and>
<dtml-sqlgroup>
<dtml-sqltest srch_IdKRe column="IdKRe" op=like type=string optional>
<dtml-or>
idKRe is Null
</dtml-sqlgroup>
<dtml-and>
...
Now, when I'have cached result set and I've changed record with field
idKRe==1 and I want to refresh this entry what should I do?
>From python script I've tried something like this:
here.srch_KOM_v_PropozycjeCC.flushCacheEntry(srch_IdKRe=1)
but this doesn't work...
The definition is as follows:
flushCacheEntry(REQUEST=None, **kw)
and what is the role of REQUEST parameter? Do I need to pass all the query
parameters to this method?
Maciej Wisniowski