Show
Ignore:
Timestamp:
04/13/08 04:41:46 (20 months ago)
Author:
bchoate
Message:

Applied patches from Ogawa-san to add an optimized 'exist' method for testing for existing rows. BugId:69661

Files:
1 modified

Legend:

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

    r1502 r1873  
    5959                     order  => '', 
    6060                     limit  => undef, 
     61                     offset => undef, 
     62                    }, 
     63    ); 
     64} 
     65 
     66sub exist { 
     67    my $driver = shift; 
     68    my($class, $terms, $args) = @_; 
     69 
     70    return $driver->_select_aggregate( 
     71        select   => '1', 
     72        class    => $class, 
     73        terms    => $terms, 
     74        args     => $args, 
     75        override => { 
     76                     order  => '', 
     77                     limit  => 1, 
    6178                     offset => undef, 
    6279                    },