Re: Re: [metabase-dev] NULL

From: Date: Wed, 18 Sep 2002 03:19:37 +0000
Subject: Re: Re: [metabase-dev] NULL
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9135@lists.php.net to get a copy of this message
Hello, On 09/17/2002 08:25 AM, Lukas Smith wrote:
if I now pass $value to one of the get*Value() methods it returns
NULL
as defined by the database. This would would break BC, but would be quite a valueable addition.
I don't much point in that. NULL is always NULL in any SQL database.
Why
do you want to have the functions to handle undefined values when they should always return "NULL"?
Because I dont what to handle this in my application. If I want to write a given value I don't want to first check if I have to convert it to the string "NULL" or if I can use one of the get*Value() methods. Of course if it's a not null field I am writing to I will still have to handle that in my application. But that is a different issue.
I can see where you are getting. Anyway, I would resist to add yet another feature that will add more bloat the driver classes. It is not much but if you keep adding many small and not really necessary features like this, you end up with very bloated driver classes. Another point is that if you by accident pass a variable that is undefined, eventually because you spelled it wrong, it will silently return a NULL instead of the usual undefined variable warning from PHP. -- Regards, Manuel Lemos

« previous php.pear.dev (#9135) next »