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

Jeff Kowalczyk jtk@yahoo.com
Wed, 27 Nov 2002 14:30:29 -0500

I agree that mapping SQL Null to None is much more useful than Missing.Value. My only
experience has been with ZODBCDA and the Zope mxODBC DA, both of which map Null to
Missing.Value. For things like tal:condition, 'None' is far more friendly to TTW tales and
TTW script usage, as Deiter points out. And from my point of view, Null isn't semantically
'Missing', it is an intentionally blank value, equivalent to None. I think of Missing
along the lines of a dictionary key error.

I expect to transition from Windows databases to ZpsycopgDA and ZMySQLDA over time and if
they all use the Null-None mapping, I'd greatly prefer to see it that way in Zope mxODBC
DA. Unless there's a good reason, I would consider that the more correct behavior.

"Dieter Maurer" <dieter@handshake.de> wrote in message
> 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?
> Where did you find that documented?
> 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.
> Dieter