List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:March 20 2009 9:16pm
Subject:Re: checking NULL
View as plain text  
On Mar 19, 2009, at 11:51 PM, Jithin Emmanuel wrote:

> I am not comparing against the string.

Oops.  I saw that get_string() call and went off on a tangent.

> est.cpp:58: error: no match for 'operator==' in
> 'mysqlpp::Row::operator[](const char*) const(((const char*)"name")) ==
> mysqlpp::null'

I apologize, again, for misleading you.  MySQL++ *should* allow this,  
but it doesn't yet.  I've added it to the Wishlist; it may appear in  
v3.1.

> At last I found what I was looking for. Its
> row["name"].is_null()

Yes, that's legitimate, too.  It just lacks some syntactic elegance,  
compared to using ==.
Thread
checking NULLJithin Emmanuel19 Mar
  • Re: checking NULLWarren Young19 Mar
    • Re: checking NULLJithin Emmanuel19 Mar
      • Re: checking NULLWarren Young19 Mar
        • Re: checking NULLJithin Emmanuel20 Mar
          • Re: checking NULLWarren Young20 Mar
            • Re: checking NULLJithin Emmanuel20 Mar
              • Re: checking NULLJithin Emmanuel20 Mar
              • Re: checking NULLWarren Young20 Mar