[Zope-DB] Re: Test for equality to Missing.Value (empty field)?

M.-A. Lemburg mal@lemburg.com
Wed, 27 Nov 2002 22:02:26 +0100


Dieter Maurer wrote:
> M.-A. Lemburg writes:
>  > ...
>  > Note that the mxODBC Zope DA also maps None returns (which represent
>  > NULLs in SQL) to Zope's Missing.MV. The Zope DA has to do this to
>  > stay compatible to the other DAs.
> Are you sure?

Who can be sure ? ;-) There's next to no documentation on how the
Zope relational interface actually works...

http://www.zope.org/Members/petrilli/WritingADA is pretty
much all I found. I learned the rest from reading the code
in ZODBCDA/ and Shared/DC/ZRDB/.

> Where did you find that documented?

Nowhere... I just looked at the source code of several existing
DAs out there. The old ZmxODBCDA used to apply this mapping,
so I thought that in order to maintain compatibility to this
DA, it would be needed as well.

> The DA's I used ("ZpsycopgDA", ZMySQLDA, ZOracleDA")
> map SQL Null to "None" and this is good,
> as "Missing.MV" is unavailable in TTW code.
> This makes it quite not very adequate for the job.

Very true. I never understood why Missing.MV was used
in ZmxODBCDA; I'll drop the mapping in the next beta and
see how things go.

Thanks,
-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/