> -----Original Message-----
> From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 08, 2000 10:21 PM
> Subject: Re: [Zope] Q: Accessing ZSQL methods from Python
>  > my question is what type or value is returned by a ZSQL 
> method that is
>  > invoked from Python?
> ZSQL methods return "Shared.DC.ZRDB.Results.Results" instances.
> Such an instance essentially behaves like a sequence of
> objects each describing one result row.
> These objects have been set up such that a column value
> can be accessed as attribute with the column name.
> Thus, "results[i].column" gives the value of "column" of
> the i.th row.
Yes, that works fine. But I need to know of NULL values.

> How to determine, how "Null" values are recognized,
> is less a Zope than a database adapter question.
> I would expect, that most (if not all) database
> adapters will map SQL Null to None.
That was what I thought but at least ZODBC won't do this.
What I have found out is, that repr(SQL NULL) == 'Missing.Value'.

> However, even some well established SQL databases do not
> treat Null standards-conform but represent it as
> the empty string. Then, the database adapter has
> no chance to map this to None but must use '', too.
ZODBC won't do this either.

> Dieter

This email message has been swept by MIMEsweeper for the presence of
computer viruses.

Francotyp-Postalia AG & Co.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to