List:MySQL++« Previous MessageNext Message »
From:Jim Wallace Date:December 18 2009 1:23pm
Subject:RE: Overloaded store, etc?
View as plain text  
Yes, the issue is differentiating between template queries and normal
queries.  I've posted a couple times before on this issue.

The argument for getting rid of it is that we've lost a few man-days of
work for this frustrating little trap that only manifests itself at
runtime.  Unless you're aware of it, it is very easy to fall into, and
usually takes debugging down into MySQL++ to figure out that it's using
the wrong overloaded method.

To make matters worse, just this week one of our developers, who knew
about the problem, tried to avoid it with code something like this, but
fell into the trap anyway.

query << "CALL my_sp( %0q )";
s = query.str( "test" );
query.execute( s );

He was trying to build the SQL string and execute it to avoid the
overload issue, but of course what it did was pass in s to the query
resulting in SQL that was like "CALL my_sp( 'CALL my_sp( %0q )' )"

Specifically, what I'd like to see is getting rid of one of the
overloads to clear up the runtime ambiguity.  Create a executeTemplate()
or executeString() methods to help save other programmers from lost time
due to ambiguous overloads.


-----Original Message-----
From: Warren Young [mailto:mysqlpp@stripped] 
Sent: Thursday, December 17, 2009 4:26 PM
To: plusplus@stripped
Subject: Re: Overloaded store, etc?

On Dec 17, 2009, at 6:33 AM, Jim Wallace wrote:

> Seems like I saw some discussion recently on the confusion between
> store(query) and store(stringparam).

I guess you mean store(const SQLTypeAdapter&) in both cases, and are
differentiating between template queries and normal queries?

> I know it's an interface change, but are they any plans on removing
> gotcha?

Make a good case for it, and I'll add it to the Wishlist for v4.

As it stands, I'm not yet sure exactly what it is you want removed. :)
MySQL++ Mailing List
For list archives:
To unsubscribe:

Overloaded store, etc?Jim Wallace17 Dec
  • Re: Overloaded store, etc?Warren Young17 Dec
    • RE: Overloaded store, etc?Jim Wallace18 Dec
      • RE: Overloaded store, etc?Martin Gallwey18 Dec
        • RE: Overloaded store, etc?Jim Wallace18 Dec
      • Re: Overloaded store, etc?Warren Young18 Dec
        • Re: Overloaded store, etc?Warren Young18 Dec