[Zope] sqlsetgroup/sqlsetvar

Chris Green cmg@uab.edu
02 Jul 2001 13:39:20 -0500


I'm working on some pretty trivial tags ( once you figure out how to
munge sqlgroup and sqlvar ) work that allow

<dtml-sqlsetgroup>
  <dtml-sqlsetvar col_name=title_col name=title_or_id type=string>
<dtml-and>
  <dtml-sqlsetvar col_name=id_col name=id type=string>
<dtml-and>
  <dtml-sqlsetvar col_name=misc_col expr='None' type=string>
</dtml-sqlsetgroup>

to expand to:  ( note that the 3rd col isn't there - I haven't figure
out a good way to do it yet -- thinking omit unless a default= is
specified. )

title_col='Our Test Page', id_col='wee'

with a usage somewhat envisioned:

UPDATE table
SET
title_col='Our Test Page',
id_col='wee'

So that update methods can have the same flexibility that select
methods do currently.

Has anyone done this already?

Currently I'm doing:

String.commands[SQLSetVar.name] = SQLSetVar
for each initialization of a dtml tag.


How do I only attach to the ZRDB package initialization without
actually editing the ZRDB package?
-- 
Chris Green <cmg@uab.edu>
This is my signature. There are many like it but this one is mine.