G'day
I dunno if it's relevant that it's from MySQL or not,  but I thought
I'd mention it.

I have a query that fetches a record set that has no value for one of
the columns.

On CF8 (and all versions of CF, as far as I know), this "no value"
situation is represented by an empty string.  Of course an empty
string is not the same as "no value", but that's how CF has always -
to my knowledge - done it.

On OBD, it's returning something claiming to be NULL (as read from a
<cfdump>).  If it really was null, I would expect an isDefined() test
to fail, but it passes, so am not sure what it is.  What it is *not*
is an empty string, though.

I have discovered this because MXUnit - as part of its assertEquals()
logic - will call toString() (the Java method, not the CF function) on
the object it's been passed.  On CF the [no value] is an empty string,
so this works fine.  On OBD it errors, because whatever the object is,
it doesn't have a toString() method.

Using native BD functions on this null value works fine: val() returns
0; len() returns 0, etc.  So I guess from a CFML-engine compat
perspective, it's doing it all OK.

However I thought I should mention the incompat when it comes to
making assumptions about what underlying datatype the thing is.

This is just an FYI thing... I'm gonna patch my install of MXUnit to
force it to be an empty string (just by appending another empty string
to it works), and my immediate issue goes away.

Cheers.

--
Adam

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to