On Wed, May 04, 2005 at 01:17:00AM +0200, Steffen Goeldner wrote:
> Tim Bunce wrote:
> 
> On the occasion of the 1st anniversary - where did the time go?

[whoosh]

> > When a batch is first executed the statement handle appears exactly
> > as if the batch only contained the first sub-statement.
> > The only exception is that the $sth->{NUM_OF_PARAMS} attribute
> > equals the total number of placeholders in the entire statement.
> > 
> > The $sth->more_results method is used to move to the results of the
> > next sub-statement in the batch. If more_results() returns true then
> > the statement handle appears exactly as if the batch only contained
> > the next sub-statement. And so on. The $sth->more_results() method
> > I<appears> to have the effect of preparing and executing the next
> > sub-statement within the batch.
> 
> That means, more_results() updates the $sth?
> If the batch contains multiple SELECT's and the number of
> fields differ, then we need to change NUM_OF_FIELDS. But
> that's not allowed:
> 
>       if (DBIc_NUM_FIELDS(imp_sth) > 0)       /* don't change NUM_FIELDS! */
>           croak("NUM_OF_FIELDS already set to %d", DBIc_NUM_FIELDS(imp_sth));

We're just exploring one potential future here.
Don't let triffling difficulties obscure the possibilities :)

> >     $sth->prepare($Statement)
>       -------------
> What a $sth->prepare? Do you mean $sth->{Database}->SUPER::prepare?
> (But, in this case, we have a new $sth!)

It's an example for illustrative purposes only. (Ignoring the fact that
I've talked in the past of DBI v2 having a $sth->prepare method.)

Tim.

Reply via email to