Andrew Sayers wrote:
> would have been better said 6 months ago.
<div id="whine">rant rant bitch bitch</div>
<script>$('whine').innerHTML = '';</script>
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
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?