ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-dbi-dev
perl-dbi-dev
Re: Time to Document Callbacks
by Tim Bunce other posts by this author
Oct 28 2009 1:55PM messages near this date
Re: Time to Document Callbacks | Re: Time to Document Callbacks
On Wed, Oct 28, 2009 at 10:26:49AM -0700, David E. Wheeler wrote:
>  On Oct 28, 2009, at 2:59 AM, Tim Bunce wrote:
> 
> > Here's a deal: you write some tests for ChildCallbacks in
> > t/70callbacks.t and I'll implement them.
> 
>  Deal.

Great. Thanks.

> >> Oh, nice. Does that mean you'll have more time for the DBI?
> >
> > That's the hope.
> 
>  W00t.

I need to devote time to java2perl6 and other perl6-database-interface
related activities.

> > I'm probably being over-cautious. Most drivers use fetch() or
> > fetchrow_arrayref() as the lowest-level calling method used by the other
> > fetch* ad select* methods. So applying the same callback to both would
> > work find in most cases.
> 
>  If I'm applying a callback to the "fetch" method, I expect it to execute 
>  when I actually call the fetch method on the STH to which I applied it. 
>  Reasonable, no? Is there some reason that wouldn't happen? If so, I'd call 
>  it a bug in the driver, frankly.

If you're applying a callback to the "fetch" method and then your code
calls fetchrow_hashref, for example, how do you know if the driver's
fetchrow_hashref() method calls fetch() or fetchrow_arrayref()?

The fetch and fetchrow_arrayref method are typically aliased by the
driver, but they're two separate methods from the DBI dispatcher's point
of view.

Applying the same callback to both is a reasonable approach.

Tim.
Thread:
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
David Nicol
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
H.Merijn Brand
Tim Bunce
David E . Wheeler
David E. Wheeler
David E. Wheeler
David E . Wheeler

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved