Hi Warren.
Basically I made a wrapper around the mysqlpp library.
People can say like:
DatabasePtr->preparestatement( "SELECT * FROM %0 WHERE %1=%2q;" );
(I don't know how many parameters there are here!, this is all client
sided).
+--> this calls query << "passed query"; query.parse();
PrepSttPtr->bindParam( <position|name>, value );
+--> this calls query.def[ <position|name> ] = value;
PrepSttPtr->fetch()/runQuery()
+--> this calls store/execute
As you can see, people can enter their own queries, and pass their own
parameters. They can even re-use the preparedstatement, only re-binding the
changed parameters (for example a big update).
This worked untill lately I upgraded to v 232. In this version I don't find
a way to (without a hack) make it work again.
I fixed it by adding in query.cpp at the very last line of the proc()
function: "p.processing_ = false;"
processing_ is defined as "has been processed"... So, after going through
the proc() function it has been processed...
Works like a charm until now for me (both for non templated queries, updates
deletes, 1 function templates, ...)
Hope this clarifies my situation.
Greetings,
Steven
On 7/16/07, Warren Young <mysqlpp@stripped> wrote:
>
> Steven Van Ingelgem wrote:
> >
> > I don't know how many parameters will need to be entered before...
>
> You need to know that before you can construct the template. Query::def
> doesn't solve that for you.
>
> Maybe you should give some examples of the kind of queries you would
> like to construct, and say how you think the library should support
> their creation. Development work on v3 has just started; there's no
> more opportune time to get a good hearing for feature requests than
> right now.
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=1
>
>