Examples
Sample usage:
select * from employees
<dtml-sqlgroup where>
<dtml-sqltest salary op=gt type=float optional>
<dtml-and>
<dtml-sqltest first op=eq type=string multiple optional>
<dtml-and>
<dtml-sqltest last op=eq type=string multiple optional>
</dtml-sqlgroup>
(...)
If
salary is 50000 and last is Smith it renders:select * from employees
where
(salary > 50000.0
and
last='Smith'
)
Mmmm..., is ZPoPyDA supposse to do that? I donīt think so. My code:
Arguments: id, name.
SELECT * FROM Departments
<dtml-sqlgroup
where>
<dtml-sqltest id op=eq type=int
optional>
<dtml-and>
<dtml-sqltest name op=eq
type=string optional> IT WORKS!!! with the fix by Jim
Penny
</dtml-sqlgroup>
ORDER BY id
My Query Result without blanks arguments, Zope renders...
SELECT * FROM Departments
where
name =
''
ORDER BY idDepartamento
Ups! Is it my code or is it a new bug? Iīm thinking about change to psicopg... Is it a good idea?
Antonio Carrasco