On 9/7/07 12:04 AM, Ask Bjørn Hansen wrote:
> On Sep 6, 2007, at 7:16 PM, John Siracusa wrote:
>> Or I suppose you could do the reverse, requiring a "special" value to
>> trigger the use of a default and leaving undef as the null stand-in.
> 
> That'd by far be my preference.  In the application code undef and
> NULL maps so beautifully.  Also it keeps use of the "special" value
> mostly inside RDBO.

But what about all the existing code that expects undef to trigger the use
of the default value?

Hm, how about this: a new column attribute called undef_sets_null (or
something) that's false by default.  When true for columns that allow nulls,
explicitly setting a column to undef would always set it to null, regardless
of any default value.  (My inclination is to make this the case for both
values from the user and values from the db.)

-John



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to