MySQL Lists are EOL. Please join:

List:MySQL++« Previous MessageNext Message »
From:Rick Gutleber Date:October 30 2008 2:48pm
Subject:Re: Some thoughts about a SQLStream
View as plain text  
Warren Young wrote:
> Rick Gutleber wrote:
>> 1.  We could just stick those methods in a class called SQLEscaper 
>> from which Query and SQLStream are derived.
> Again, you can't go changing parent classes until v4.  That could be 
> years out; might never even happen.  You need to work within the 
> current framework if you want this to in v3.1, which is what I had in 
> mind.

Yeah, I realized after I mailed it out that this would break the ABI.  I 
keep forgetting...

>> * I have to wonder why those methods aren't in Connection to begin 
>> with.  I realize Connection isn't intended for dealing with SQL, but 
>> those methods in Query don't actually use any aspect of Query!
> Observe how often these methods are called in lib/manip.cpp via Query, 
> either directly or through a SQLQueryParms, which has a Query as its 
> parent.  These interfaces have to exist here

It certainly seems like it wouldn't hurt to have the manip.cpp stuff 
check for two different classes instead of just one.  I'd recommend 
doing the SQLEscaper thing anyway, and only use it in SQLStream for the 
time being.

> De-encapsulating this strikes you as good design?

Of course not.  This was just as a temporary measure to see if there was 
some unobvious reason the methods couldn't be static, and since there 
weren't, this means they could go in Connection.  It was an experiment, 
not a change.

I'll prototype a SQLStream, as time allows, and see how it goes.

Some thoughts about a SQLStreamRick Gutleber30 Oct
  • Re: Some thoughts about a SQLStreamWarren Young30 Oct
    • Re: Some thoughts about a SQLStreamRick Gutleber30 Oct
      • Re: Some thoughts about a SQLStreamWarren Young31 Oct