List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:November 11 2009 5:51pm
Subject:Re: Testing for NULL in a StoreQueryResult
View as plain text  
On Nov 11, 2009, at 10:36 AM, Wolfgang Pausch wrote:

> I tried to do a
> if (result[n][0] == mysqlpp::null) {... }, however then the compiler  
> says I
> would have a ambiguous overload for operator ==

Direct equality comparison is only supposed to work when you use the  
Null template, but the return value of result[n][0] is String, not  
Null<String>.  (We wouldn't want it otherwise, because that would  
imply that all field values are potentially nullable.)

What you want is result[n][0].is_null()

> PS: When using kmail before, your spamfilter didn't accept my mail  
> (tried several times)

The list is generously hosted for us by MySQL, Inc., so you'll have to  
work with their IT people to see what can be done.
Testing for NULL in a StoreQueryResultWolfgang Pausch11 Nov
  • Re: Testing for NULL in a StoreQueryResultWarren Young11 Nov