The definition of null is the absence of value and meaning.  So
regardless of whether it's a null column or no rows, no meaning should
be applied to it.  Thus these cases are the same.

If you want meaning to come from the row, return a value, perhaps the
row number.

Clinton

On 2010-04-13, cowwoc <[email protected]> wrote:
> Hi,
>
>      I hope I'm not reopening a hornet's nest but I just noticed the
> following comment in the code:
>
> // Popular vote was to return null on 0 results and throw exception on
> too many.
>
>      How do you differentiate between selectOne() returning null because
> it found no rows versus it finding a single row containing a null value?
> I remember Sun's Engineers had the same debate for auto-boxing (should a
> null Integer get unboxed as "0" or throw an exception?) and they settled
> on exceptions precisely because of this ambiguity. Was there a huge vote
> in favor of returning null for zero results or are you still open to
> some hand twisting? :)
>
> Gili
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

-- 
Sent from my mobile device

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to