[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Relational Database Connectivity
webmaster@zope.org
webmaster@zope.org
Sat, 28 Sep 2002 06:10:48 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatabases.stx#3-26
---------------
The items in the sequence of results returned by a Z SQL Method
are called *Result objects*. Result objects can be thought of
as rows from the database table turned into Zope objects. These
objects have attributes that match the schema of the database
results.
% Anonymous User - Aug. 14, 2002 1:24 pm:
A useful tip is that you can access the column headings of your database table by calling <results
object>.names()
% Anonymous User - Sep. 28, 2002 6:10 am:
what a zsql method really returns (the Result object) is a mystery;
for use in python read
http://www.zope.org/Members/spinwing/ZSQL_Results
for dtml, zsql method automatically returns this dictionary,
which is a pythonized table,
namely a list of dictionarys, one for each row,
each row dictionary w columnnames as keys like {colname1:val1, colname2:val2,...}