List:MySQL++« Previous MessageNext Message »
From:Rick Gutleber Date:March 6 2009 4:55pm
Subject:Re: How to pass SQLTypeAdapters to create a SQLQueryParms?
View as plain text  
Warren Young wrote:
> Warren Young wrote:
>>
>> The second parameter should...be "NOW()"
>
> Thinking more about this, I wonder if MySQL++ should provide such a 
> thing?
>
>     #define NOW() mysqlpp::DateTime()
>
> is dangerous in that it puts a 3-letter word at global scope, so 
> there's a good chance of name collision.
>
No, no, a thousand times no!  Er, I agree with your assessment.

>     namespace mysqlpp {
>         inline DateTime NOW() { return DateTime(); }
>     }
>
> is inefficient, but it probably doesn't matter, and it fixes the 
> global symbol problem.
>
Why is this inefficient?  Won't the compiler inline it so the net result 
is the same as a #define, minus being in the mysqlpp namespace?

Rick



Thread
How to pass SQLTypeAdapters to create a SQLQueryParms?Alex Luya6 Mar
  • RE: How to pass SQLTypeAdapters to create a SQLQueryParms?Jim Wallace6 Mar
    • Re: How to pass SQLTypeAdapters to create a SQLQueryParms?Warren Young6 Mar
      • Re: How to pass SQLTypeAdapters to create a SQLQueryParms?Warren Young6 Mar
        • Re: How to pass SQLTypeAdapters to create a SQLQueryParms?Rick Gutleber6 Mar
          • Re: How to pass SQLTypeAdapters to create a SQLQueryParms?Warren Young6 Mar