[Zope] zSQl and changing connection ids?
Dieter Maurer
dieter@handshake.de
Sun, 1 Apr 2001 21:43:29 +0200 (CEST)
David Hassalevris writes:
> ....
A Z SQL method consists of
the connection id,
the parameters
and the SQL template
You want to share the parameters and the template but vary
the connection id.
I think it is not a good idea to dynamically change the
connection id to handle this case. You object would
be changed continously and create lots of artificial
versions - a bad thing.
I would create several SQL methods that share a common
SQL template. I fear, you would need to replicate
the parameter parts.
Thus, you would have:
Z SQL method<n>:
Connection: different ones according to object
Parameters: explicit copies of the parameter list
Template: <dtml-var common-template>
It may be (I fear it will be) that you can not use
"dtml-sql*" tags in "common-template".
In this case, you have 2 options:
* emulate the "dtml-sql*" tags by normal tags
* make a small product that makes the "dtml-sql*" tags
generally available
Dieter