[Zope] zsql .dictionaries() question
Dieter Maurer
dieter@handshake.de
Sun, 12 Aug 2001 19:56:01 +0200 (CEST)
David Golden writes:
> The references to '.dictionaries()' work as anticipated on the Gadfly DB.
>
> The original DB is an ODBC one, and I expect there is some compatibility
> issue between the adapter and
> the drivers.
I was very astonished about this statement because I was convinced,
that the SQL Method were responsible to wrap the result into
a "Results" objects.
I looked in the code and see:
if type(result) is type(''):
f=StringIO()
f.write(result)
f.seek(0)
result=RDB.File(f,brain,p, zc)
else:
result=Results(result, brain, p, zc)
This means, that the result of a Z SQL Method is
a "Shared.DC.ZRDB.RDB.File" object rather than a "Results"
object when the database adapter returns a string
rather than a list.
Guess: "File" does not have a "dictionaries" method
(but "names" and "data_dictionary").
Seems to be a case for the Collector. I seems bad to
have almost identical code in two different modules.
Dieter