IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29082


Ignore:
Timestamp:
Aug 31, 2010, 1:48:37 PM (16 years ago)
Author:
rhenders
Message:

Changed some method names for clarity

Location:
trunk/ippToPsps/perl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/checkOdmStatus.pl

    r29047 r29082  
    7272    my $numOfBatches;
    7373
    74     if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatch($singleBatch, \$batches);}
    75     else { $numOfBatches = $ippToPspsDb->getBatchList(\$batches, $fromTime, $toTime);}
     74    if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatchOnDatastore($singleBatch, \$batches);}
     75    else { $numOfBatches = $ippToPspsDb->getListOfBatchesOnDatastore(\$batches, $fromTime, $toTime);}
    7676
    7777    if ($numOfBatches < 1) {return 0;}
  • trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm

    r28952 r29082  
    1515#
    1616###########################################################################
    17 sub getBatchList {
    18     my ($self, $exposures, $fromTime, $toTime) = @_;
     17sub getListOfBatchesOnDatastore {
     18    my ($self, $batches, $fromTime, $toTime) = @_;
    1919
    2020    my $query = $self->{_db}->prepare(<<SQL);
     
    2929    # TODO remove date restriction
    3030    $query->execute;
    31     ${$exposures} = $query->fetchall_arrayref();
    32     my $count = scalar @{${$exposures}};
     31    ${$batches} = $query->fetchall_arrayref();
     32    my $count = scalar @{${$batches}};
    3333
    3434   printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es");
     
    4141#
    4242###########################################################################
    43 sub getSingleBatch{
    44     my ($self, $batch_id, $exposures) = @_;
     43sub getSingleBatchOnDatastore{
     44    my ($self, $batch_id, $batches) = @_;
    4545
    4646    my $query = $self->{_db}->prepare(<<SQL);
     
    5353 
    5454    $query->execute;
    55     ${$exposures} = $query->fetchall_arrayref();
    56     my $count = scalar @{${$exposures}};
     55    ${$batches} = $query->fetchall_arrayref();
     56    my $count = scalar @{${$batches}};
    5757
    5858   printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es");
     
    424424    return $row[0];
    425425}
     426
     427sub insetDetection {
     428    my ($self, $expId, $imageID, $objID,$ippObjID, $ippDetectID) = @_;
     429
     430   my $query = $self->{_db}->prepare(<<SQL);
     431    INSERT INTO detections
     432        (expId, imageID, objID, ippObjID, ippDetectID)
     433        VALUES
     434        ($expId, $imageID, $objID,$ippObjID, $ippDetectID);
     435SQL
     436
     437    $query->execute;
     438
     439}
     440
    4264411
Note: See TracChangeset for help on using the changeset viewer.