Show
Ignore:
Timestamp:
06/02/08 02:15:39 (18 months ago)
Author:
fumiakiy
Message:

Group_by methods now returns an iterator that can be finished early. BugId:79888

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/lib/MT/ObjectDriver/Driver/DBI.pm

    r2473 r2475  
    201201    my $i = 0; 
    202202    return sub { 
     203        if (@_ && ($_[0] eq 'finish')) { 
     204            if ($sth) { 
     205                $sth->finish; 
     206                $driver->end_query($sth); 
     207            } 
     208            undef $sth; 
     209            return; 
     210        } 
     211 
    203212        unless ($sth->fetch && defined $count && (!defined $limit || ($i < $limit))) { 
    204213            $sth->finish;