Mike Rylander <mrylan...@gmail.com> was heard to say:

> Markus,
>
> Would it be worth the ugliness of a module-global variable to bury the
> value of the row index used in the previous call to  
> dbd_mysql.c::dbd_goto_row()
> inside the MySQL driver itself, side-stepping the function signature change
> for other drivers?  The benefit of avoiding the API change may not be
> outweighed by the potential fragility of naively tracking the state
> internally, of course, since in practice folks install and upgrade to new
> versions of drivers and the libdbi core at the same time, but then again,
> it may.  I'm a little nervous about the potential for problems when mixing
> direct goto_row() (cursor style) and next_row() calls, but I haven't looked
> at the code to see if there's actually an issue there...
>

Hi,

I'll have to read the code again a little more thoroughly, but to the  
best of my knowledge libdbi emulates MySQL's approach to retrieving  
rows from result sets. In order to walk through the rows of e.g. a  
PostgreSQL result set you have to retrieve the rows by index  
sequentially, so libdbi has to maintain an internal pointer anyway. We  
do not have to add one, so there are no extra changes. Also, libdbi  
internally already mixes the cursor style and next_row style calls,  
because we have to cater for database engines which use either of  
these methods without exposing these differences to the libdbi user.

As for the API change, we have extensive driver API changes between  
0.8.x and the upcoming(TM) 0.9 release anyway, think of the recent  
addition of the transaction stuff. You won't be able to keep your  
0.8.x drivers once you switch to libdbi 0.9. You'll probably notice  
problems only if you build from cvs regularly (and only if you update  
one but not the other), but I expect those users to know what they're  
doing.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users

Reply via email to