[ZCM] [ZC] 437/ 1 Request "sqltest and 'not in'"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Tue, 18 Jun 2002 15:24:36 -0400


Issue #437 Update (Request) "sqltest and 'not in'"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/437

==============================================================
= Request - Entry #1 by jshell on Jun 18, 2002 3:24 pm


Uploaded:  "sqltest.py.diff"
 - http://collector.zope.org/Zope/437/sqltest.py.diff/view
The 'sqltest' tag doesn't generate 'not in' for situations like:

 <dtml-sqltest foo type=nb multiple op=ne>

Currently, if 'foo' has the single value 'baz', this sqltest tag generates:

 foo <> 'baz'

But if 'foo' has the value ['bar','baz'], the sqltest tag generates:

 foo in ('bar,'baz')

The attached patch against file revision 1.14.16.3 (Zope 2.5 branch) seems to work fine, by using 'not in' when there are multiple values and the value of the 'op' parameter is '<>'.

I'd like to see this as soon as possible - at least in Zope 2.6 if not in a 2.5.x release (if there are any more).  If this patch is OK'd, I can check it in myself.
==============================================================