[Zope-DB] Relational Databases in Zope 2 and Zope 3
M.-A. Lemburg
mal at egenix.com
Mon Jul 12 17:25:52 EDT 2004
Chris Withers wrote:
> Charlie Clark wrote:
>
>>
>> def positionalQuery(self, *args):
>> """Needed to work around the __call__ method keyword bindings
>> """
>> return apply(self, (None, None, 0, 0)+args, {})
>>
>> """Keyword to parameter mapping"""
>>
>> keys = self._arg.keys()
>> if REQUEST: kw=REQUEST
>> if args:
>> for i in xrange(len(keys)):
>> kw[keys[i]] = args[i]
>> else:
>> args = list(args)
>> for i in xrange(len(keys)):
>> key = keys[i]
>> value = self._arg[key]
>> converter = type_converters[value['type']]
>> args.append(converter(kw[key])) args
>> = tuple(args)
>> if kw: REQUEST=kw
>>
>> Unfortunately this breaks current ZSQL methods completely and cannot
>> be distributed in this form.
>
> How does this breakage manifest itself?
It only breaks if you make these changes in ZSQLMethods directly.
You don't have any breakage if you create a new product which is
what Charlie is looking into.
However, in order for DAs to work with positional parameters,
they will need to understand the new signature of the .__call__()
method.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jul 12 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Zope-DB
mailing list