db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: DERBY-308 just be done and .... (Re: [jira] Updated: (DERBY-308) Modify dblook to support "GENERATED BY DEFAULT AS IDENTITY")
Date Sat, 28 May 2005 02:51:22 GMT
Oops.  In that last email, replace all occurrences of "DefaultNodeImpl" with 
"DefaultInfoImpl".  For some reason the wrong file name was in my head.

Army wrote:
> That said, I think returning any non-null value in 
> DefaultNodeImpl.toString() will solve the problem  The question then 
> becomes what value should we return? 

[snip]

> 2) This problem can be fixed with two lines :)  But I leave it up to the 
> others on this list to decide if this is the _best_ fix, and to decide 
> on what the non-null string value should be...

Actually, as I thought about this on my ride home, I realized that changing 
DefaultInfoImpl.toString() is probably not the best fix.  To be consistent with 
GENERATED ALWAYS columns, which return null as the default, GENERATED BY DEFAULT 
should probably return null, as well.  This means that the method that should 
change is UserType.isNull().

Something like:

public final boolean isNull()
{
	if (value == null)
		return true;
	if (value instanceof DefaultInfoImpl)
		return (((DefaultInfoImpl)value).getDefaultText() == null);
	return false;
}


Mime
View raw message