From: Date: September 27 2008 2:34am Subject: Re: Regressions with quoting List-Archive: http://lists.mysql.com/plusplus/7998 Message-Id: <48DD7F7B.2050201@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Andrew Sayers wrote: > would have been better said 6 months ago.
rant rant bitch bitch
Okay, that's out of my system now. :) > the new > selective quoting means that now I have to pass a Query wherever I want > quoting to work. That's a feature. MySQL++ shouldn't quote or escape things if it doesn't know for a fact that you're building SQL strings and that the thing being inserted really needs quoting or escaping. (By the way, I think you mean escaping, not quoting.) > Could we add static member functions that call > DBDriver::escape_string_no_conn()? Add static methods to what? And, what method signature do you want to see? Also, I'm not wild about code using the no-conn escaping method any more than necessary. If you do it without reference to the server's character set, you may do it wrong. AFAIK, there is only one use of the no-conn method left in MySQL++, and there's no alternative there. If there's a way to use DBDriver::escape_string() instead, I'd prefer that. > That would make it possible to do > quoting without a Query object, and without touching C strings directly. I see why you don't want to call DBDriver::escape_string_no_conn() directly, but without knowing where you want on-demand escaping, or how that ties in with other string data types, I'm a bit lost as to what you really want. Can you give pseudocode showing how the new interface is supposed to work?