List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:April 17 2007 1:16am
Subject:Re: NULL in templatized queries
View as plain text  
Michael Hanselmann wrote:
> 
> A clean solution isn't possible without breaking compatibility; 

Just adding new functions shouldn't break anything.

> +SQLString::SQLString(const SQLNullStringTag& value) :

I don't see a need to invent a new type.  I think you can get the 
behavior you want by adding a conversion ctor to SQLString that takes a 
mysqlpp::null_type.  That ctor just evaluates to "NULL", ignoring the 
passed parameter's actual value.  To get a null template parameter, you 
simply pass mysqlpp::null.

Is that not sufficient?
Thread
NULL in templatized queriesMichael Hanselmann16 Apr
  • Re: NULL in templatized queriesMichael Hanselmann16 Apr
  • Re: NULL in templatized queriesWarren Young17 Apr
    • Re: NULL in templatized queriesMichael Hanselmann22 Apr
      • Re: NULL in templatized queriesWarren Young23 Apr